Hugo Syntax Mishandling PreProcessor Directives #34
Labels
🔨 Highlight
Tool: Highlight (syntax highlighter)
⭐ syntax highlighting
Topic: Syntax Highlighting
⚠️ important
Priority: High
Milestone
Currently, the Highlight syntax is set to capture any token starting with
#
as a preprocessor directive (up to the end of the line).This interferes with the use of
#
token used to find out the number of properties, as in:An example of how this disrupts highlighting can be found in §10.2. Characters:
Where from
#3;
onward the rest of the line is treated as preprocessor directive, and" box. "
as a preprocessor string.This can be fixed by using a dummy keyword group to capture all preprocessor directives by RegEx pattern, and then use
OnStateChange()
function to enforce them as preprocessor directive. Doing so, it will allow to also define#
as an operator.The text was updated successfully, but these errors were encountered: