Content divider disappears if EndScope pattern is whitespace

SyntaxEditor for Windows Forms Forum

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

Section Options

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

<State Key="SectionState">
<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" />

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?


Comments (2)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
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
That's good news. Thanks for the prompt reply!
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.