The tab spacing bug
This problem stems from a bug in the RichTextBox. Basically, the tab spacing in the RichTextBox is inconsistent and very strange. Sometimes a tab will be bigger than a space, and sometimes it'll be smaller than a space. I have informed Microsoft of the bug and I'm hoping they'll fix it for Silverlight 5.
What this means for Regex Hero is that tabs would throw the highlighting out of alignment. So my fix was to override tabs with spaces. I had made this change weeks ago. But today's release has this same treatment on pasting tabbed text.
This isn't ideal and basically means the \t regular expression will never match anything in Regex Hero. If I can find a better workaround I will do it. But at least today's fix means that the yellow highlighting will always be in alignment and is reliable again.
To help ensure Microsoft fixes this bug in the RichTextBox in a timely manner, you can help by up-voting the bug here on MS Connect.
Syntax highlighting
The syntax highlighter had a minor bug with back slashes. The following regular expressions are valid, but the syntax highlighter was painting them red...
It was seeing the \ before the ending parenthesis, escaping the parenthesis, and then thinking that these constructs were not closed. It didn't look far enough back to see the \\. So I fixed the bug, and now it works properly.
This problem stems from a bug in the RichTextBox. Basically, the tab spacing in the RichTextBox is inconsistent and very strange. Sometimes a tab will be bigger than a space, and sometimes it'll be smaller than a space. I have informed Microsoft of the bug and I'm hoping they'll fix it for Silverlight 5.
What this means for Regex Hero is that tabs would throw the highlighting out of alignment. So my fix was to override tabs with spaces. I had made this change weeks ago. But today's release has this same treatment on pasting tabbed text.
This isn't ideal and basically means the \t regular expression will never match anything in Regex Hero. If I can find a better workaround I will do it. But at least today's fix means that the yellow highlighting will always be in alignment and is reliable again.
To help ensure Microsoft fixes this bug in the RichTextBox in a timely manner, you can help by up-voting the bug here on MS Connect.
Syntax highlighting
The syntax highlighter had a minor bug with back slashes. The following regular expressions are valid, but the syntax highlighter was painting them red...
(abc\\)
[abc\\]
It was seeing the \ before the ending parenthesis, escaping the parenthesis, and then thinking that these constructs were not closed. It didn't look far enough back to see the \\. So I fixed the bug, and now it works properly.
Comments
Post a Comment