Releases: CXuesong/MwParserFromScratch
Releases · CXuesong/MwParserFromScratch
v0.3.0-int.8
- Dropped support for .NET Standard 2.0. The library will only target .NET 8.0+ from now on.
- Added nullable reference type annotations for the library API.
- Introduced a visitor (base) class
PlainTextNodeRendererto replace the flawedNodePlainTextFormatterdelegate. (#25)- This makes it possible to tweak the plain-text conversion behavior (e.g. customize how a template should be rendered) while keeping the rest of the existing behavior unchanged by deriving from the
PlainTextNodeRendererclass. - A usage example can be found in the UT method CustomPlainTextNodeRendererTest1.
- This makes it possible to tweak the plain-text conversion behavior (e.g. customize how a template should be rendered) while keeping the rest of the existing behavior unchanged by deriving from the
v0.3.0-int.7
HtmlTag.ToPlainTextCore: Write\nwhen formatting<br />or<hr />into plaintext.
v0.3.0-int.6
- Fixed
CloneCoreimplementation for variousNodeclasses. (#18 by @FaFre) TemplateArgumentCollection.SetValuenow acceptsstringas argument name.- Added
Wikitextconstructor overload shorthands that acceptstring(asPlainText) orInlineNodeinstances. - Dropped explicit support for .NET Framework. We are planning to drop support for lower .NET Standard version in the future in order to adopt new C# language features.
v0.3.0-int.4
- Bug fix:
NullReferenceExceptionwhen callingNode.ToPlainTextonHtmlTags with empty content. (#15)
v0.3.0-int.3
- Add support for embedded image expression parsing. AST node type:
WikiImageLink. (#13)
v0.3.0-int.2
- Refactored
Node.ToPlainTextto receive an optional delegate for customizing how aNodeshould be converted into plain text. (#15)- Removed
NodePlainTextOptionsto this end.
- Removed
- The following parser tags are not shown in
ToPlainTextoutput- math
- ref
- templatedata
- templatestyles
- To change this default behavior, refer to #15.
v0.3.0-int.1
- Force to end all the unbalanced HTML tags at the end of
WIKITEXT. (#14)- The old behavior is to leave tags as unparsed
PLAIN_TEXT. The old behavior can cause performance issue when parsing unbalanced tags, such as #3.
- The old behavior is to leave tags as unparsed
- Take care of unbalanced
<li>tag parsing. (#14) - Unbalanced tags will have
TagStyleset toTagStyle.NotClosed.
0.2.1
- Fixed #12. Now parser handles tags with uppercase letters properly.
- Prepare for the wikitext table expression support
- Added
TagAttributeCollection, which in the future will be used inTagNodeas well as inTableContentNode - Converted
InlineContainerabstract class toIInlineContainerinterface - Added preliminary
Tableclass. - The table parsing support is still yet to be implemented.
- Added
0.2.0
- (#6) Implemented a rudimentary closing mark inference feature.
- (#7) Migrated
IWikitextSpanInfofrom offset-based to line/column-based.- Renamed
IWikitextSpanInfotoIWikitextLineInfo.
- Renamed
- Requires
LIST_ITEMstarts at the beginning of the line.- the
* itemin{{Template|* item}}will be parsed as plain-text rather than unordered list.
- the
WikitextParseris now thread-safe.- As long as you do not call
Parsewhen changing the content ofWikitextParserOptions.
- As long as you do not call
The attached "debug" package is built in DEBUG mode, and may provide some extra runtime assertions (Debug.Assert).