Changes on top of v3.0.0-alpha.2:
1. NullFormatter
processes complex formats:
- Behavior is comparable to
ChooseFormatter
- Allows for nested formats
- More plausibility checks
2. NewtonsoftJsonSource
: fix evaluating null values
3. Add missing formatters to Smart.CreatDefaultFormatter
- include IsMatchFormatter
- include NullFormatter
4. Improved parsing of HTML input
Introduced experimental bool ParserSettings.ParseInputAsHtml
.
The default is false
.
If true
, theParser
will parse all content inside <script> and <style> tags as LiteralText
. All other places may still contain Placeholder
s.
This is because <script> and <style> tags may contain curly or square braces, that interfere with the SmartFormat {Placeholder
}.
Best results can only be expected with clean HTML: balanced opening and closing tags, single and double quotes. Also, do not use angle brackets, single and double quotes in script or style comments.
SmartFormat is not a fully-fledged HTML parser. If this is required, use AngleSharp or HtmlAgilityPack.