A basic .NET Library for parsing wikitext into AST.
APACHE-2.0 License
HtmlTag.ToPlainTextCore
: Write \n
when formatting <br />
or <hr />
into plaintext.Published by CXuesong almost 3 years ago
CloneCore
implementation for various Node
classes. (#18 by @FaFre)TemplateArgumentCollection.SetValue
now accepts string
as argument name.Wikitext
constructor overload shorthands that accept string
(as PlainText
) or InlineNode
instances.Published by CXuesong over 4 years ago
NullReferenceException
when calling Node.ToPlainText
on HtmlTag
s with empty content. (#15)Published by CXuesong over 4 years ago
WikiImageLink
. (#13)Published by CXuesong over 4 years ago
Node.ToPlainText
to receive an optional delegate for customizing how a Node
should be converted into plain text. (#15)
NodePlainTextOptions
to this end.ToPlainText
output
Published by CXuesong over 4 years ago
WIKITEXT
. (#14)
PLAIN_TEXT
. The old behavior can cause performance issue when parsing unbalanced tags, such as #3.<li>
tag parsing. (#14)TagStyle
set to TagStyle.NotClosed
.Published by CXuesong over 6 years ago
TagAttributeCollection
, which in the future will be used in TagNode
as well as in TableContentNode
InlineContainer
abstract class to IInlineContainer
interfaceTable
class.Published by CXuesong over 7 years ago
IWikitextSpanInfo
from offset-based to line/column-based.
IWikitextSpanInfo
to IWikitextLineInfo
.LIST_ITEM
starts at the beginning of the line.
* item
in {{Template|* item}}
will be parsed as plain-text rather than unordered list.WikitextParser
is now thread-safe.
Parse
when changing the content of WikitextParserOptions
.The attached "debug" package is built in DEBUG mode, and may provide some extra runtime assertions (Debug.Assert).
Published by CXuesong over 7 years ago
PlainText
in Paragraph
, especially when a \n
is in the paragraph content.Published by CXuesong over 7 years ago
WikitextParser.Parse()
supports CancellationToken
.NullReferenceException
when WikitextParser
is instantiated with IWikitextParserLogger
.Published by CXuesong over 7 years ago
MagicTemplateNames
to take the place of VariableNames
in WikitextParserOptions
.
NodeCollection
.LineInfoAnnotation
in parsed Node
instances.ParentNode == null
for HTML tag content Wikitext
node.Published by CXuesong over 7 years ago
Maybe it's time to publish a real release.
Template
can now distingish parser functions, and variables, from normal template expressions.
{{#if:expr|yes|no}}
, rather than getting a Template
whose Name
is #if:expr
.LineInfo
for ExternalLink
& TagAttribute
nodes.NormalizeTitle
& NormalizeTemplateArgumentName
now accepts null
values, and they will return null
for such cases.Published by CXuesong over 7 years ago
Initial release.