Skip to content

Lazarus highlights nested comments of the same syntax as one, while FPC doesn't treat them as such

  • Lazarus/FPC Version: Lazarus 4.2 (rev lazarus_4_2) FPC 3.2.2 x86_64-win64-win32/win64

What happens

Lazarus highlights {{}} as a single comment, although for FPC in this case it would only be the first three characters. This can be confusing at times.

What did you expect

Lazarus should behave like FPC and also respect the {$MODE} directives in the code text, as described in the FPC documentation: https://www.freepascal.org/docs-html/3.2.2/ref/refse2.html.

Steps to reproduce

Enter {{}} or (*(**)*) in the code editor and watch it being highlighted as a single comment.