For example, the markdown editor is completely unusable for the following file:
https://github.com/openstacknetsdk/openstack.net/wiki/Feature-Support
This appears to be caused by the regular expressions used by the editor features, which are more complicated than the expressions used by MarkdownSharp due to alterations required to support processing without first normalizing newline characters and expanding hard tabs to the correct number of spaces.
I'm currently working on a solution (80% done). Instead of using a string to represent the text in MarkdownParser, I used ITextBufferFactoryService to create a new ITextBuffer. This allows modifying the buffer, following by using ITrackingSpan to map spans of modified text back to their original locations in the source text (i.e. we can now normalize the file prior to parsing).
For example, the markdown editor is completely unusable for the following file:
https://github.com/openstacknetsdk/openstack.net/wiki/Feature-Support
This appears to be caused by the regular expressions used by the editor features, which are more complicated than the expressions used by
MarkdownSharpdue to alterations required to support processing without first normalizing newline characters and expanding hard tabs to the correct number of spaces.I'm currently working on a solution (80% done). Instead of using a
stringto represent the text inMarkdownParser, I usedITextBufferFactoryServiceto create a newITextBuffer. This allows modifying the buffer, following by usingITrackingSpanto map spans of modified text back to their original locations in the source text (i.e. we can now normalize the file prior to parsing).