I would like to use the Nuget
package Superpower
to match all non-white characters unless it is a tokenized value. E.g.,
var s = "some random text{variable}";
Should result in:
["some", "random", "text", "variable"]
But what I have now is:
["some", "random", "text{variable}"]
The parsers for it look like:
public static class TextParser
{
public static TextParser<string> EncodedContent =>
from open in Character.EqualTo('{')
from chars in Character.Except('}').Many()
from close in Character.EqualTo('}')
select new string(chars);
public static TextParser<string> HtmlContent =>
from content in Span.NonWhiteSpace
select content.ToString();
}
Of course I'm returning the strings in another variable in the parser. But this just simplified.
Hopefully that is enough information. If not I do have the whole repo up on Github. https://github.com/jon49/FlowSharpHtml