Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds a hand-rolled markdown package, and some basic implementation/usage.
Since markdown is so simple, it didn't make sense to add another dependency to a 3rd party library that has esoteric rules to customizing the output. Particularly because there doesn't seem to be a single great option with a lot of adoption and maintenance, and I don't want to get stuck with a 3rd party library that disappears and have to swap it later. I'd vendor it but there are license restrictions.
This also enables us to add custom markdown if we want, although that quickly becomes a runaway train to generating markdown that's useless to other renderers. I've added a single custom markdown.
There is support for
formatterswhich is an interface with a bunch of methods for custom wrapping the text of each markdown tag/type. I've implemented a few as test cases within the package:HTML,ANSITags, andReMarkdown(Produces a clean new markdown representation after parsing a markdown document)Changes
markdownpackage.mdbefore.template, and if found use that file, after running through markdown parser.attack.mdin help files as a testcase/example.~(sp1) =commandSupported Markdown
Rules
Headings
Markdown:
# HeadingHtml:
Ansitags:
Note: Adding additional #'s will increment the
<h#>Note: Ansitags only add the prefix for h1
Horizontal Lines
Markdown:
Html:
Ansitags:
Lists
Markdown:
Html:
Ansitags:
Emphasis
Markdown:
*Emphasize me*Html:
Ansitags:
Bold
Markdown:
**Bold me**Html:
Ansitags:
Special
Markdown:
~I'm Special~Html:
Ansitags:
Notes: Additional wrapping ~'s increment the number:
~~I'm Special~~,~~~I'm Special~~~and so on.Notes:
~~is typically treated as a strikethrough in markdown.