Content divider disappears if EndScope pattern is whitespace

SyntaxEditor for Windows Forms Forum

Posted 20 years ago by Steven Liu
Avatar
I am trying to define a SectionState for following constrcut:

Section Options
Option1=Val1
Option2=Val2

The "Section" keyword has no corresponding closing scope keyword, so I use a blank line. The state definition is:

<State Key="SectionState">
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" Token="SectionStartToken" Style="KeywordStyle" PatternValue="SECTION" LookAhead="{NonWordMacro}" />
<RegexPatternGroup Type="EndScope" Token="SectionEndToken" Style="DefaultStyle" PatternValue="\n" LookAhead="[ \t]*\n" IsContentDivider="True" />
</Scope>
</Scopes>
</State>

SyntaxEditor recognizes the state correctly, but does not show the content divider. It seems the problem occurs when the EndScope pattern is whitespace.
I found a workaround: use PatternValue=".\n" for SectionEndToken. But it has the side effect of including the last non-whitespace char in EndScopeToken.

Is that a bug or am I missing something?

Steven

Comments (2)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Allowing \n characters to designate a content divider required a tweak in the code but is now fixed for the next maintenance release.


Actipro Software Support

Posted 20 years ago by Steven Liu
Avatar
That's good news. Thanks for the prompt reply!
Steven
The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.