添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
求醉的水龙头  ·  PostgreSQL ...·  8 月前    · 
欢乐的枇杷  ·  Brackets - A modern, ...·  9 月前    · 

The code inside DO $$ block is treated as string. Because of which, syntax highlighting doesn’t work. This used to work in CM5. Screenshot from CM5:

https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQgeyBzcWwsIFBvc3RncmVTUUwgfSBmcm9tICdAY29kZW1pcnJvci9sYW5nLXNxbCc7CgpuZXcgRWRpdG9yVmlldyh7CiAgZG9jOiBgRE8gJCRcbkRFQ0xBUkVcbiAgICBfdHh0IHRleHQgOj0gJ3NvbWUgdGV4dCc7XG5CRUdJTlxuRU5EO1xuJCQ7YCwKICBleHRlbnNpb25zOiBbYmFzaWNTZXR1cCwKICAgICAgICAgICAgICAgIHNxbCh7CiAgICBkaWFsZWN0OiBQb3N0Z3JlU1FMLAogIH0pLAogICAgICAgICAgICAgIF0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5LAp9KQo=

Screenshot from CM6:

Hi @marijn ,

I revisited this and want to know why $x$ tagged(with name in between dollars) are not treated as strings?
Secondly, if there is a single quote in between then highlighting looks incorrect.

Hi @marijn ,

I understand the code is implemented based on PostgreSQL docs. But it is not helpful in many cases for example a PostgreSQL function. A lot of pgAdmin users are raising this issue of syntax highlighting.
I’m wondering if there is a way to disable it?

Hi @marijn ,
Will you accept a PR to make this optional?
People are not liking that a complete code is treated as string with no syntax highlighting.