class

Luce::ExtensionSet

Inherits Reference < Object

ExtensionSets provide a simple grouping mechanism for common Markdown flavours.

For example, the GITHUB_FLAVOURED set of syntax extensions will output HTML in a similar fashion to GitHub's parsing.

Constants

COMMON_MARK = ExtensionSet.new([FencedCodeBlockSyntax.new] of BlockSyntax, [InlineHTMLSyntax.new] of InlineSyntax)

The CommonMark extension set is close to compliance with CommonMark.

GITHUB_FLAVOURED = ExtensionSet.new([FencedCodeBlockSyntax.new, TableSyntax.new, UnorderedListWithCheckboxSyntax.new, OrderedListWithCheckboxSyntax.new, FootnoteDefSyntax.new], [InlineHTMLSyntax.new, StrikethroughSyntax.new, AutolinkExtensionSyntax.new])

The GITHUB_FLAVOURED extension set is close to compliance with the GitHub flavored Markdown spec.

GITHUB_WEB = ExtensionSet.new([FencedCodeBlockSyntax.new, HeaderWithIdSyntax.new, SetextHeaderWithIdSyntax.new, TableSyntax.new, UnorderedListWithCheckboxSyntax.new, OrderedListWithCheckboxSyntax.new, FootnoteDefSyntax.new, AlertBlockSyntax.new], [InlineHTMLSyntax.new, StrikethroughSyntax.new, EmojiSyntax.new, ColorSwatchSyntax.new, AutolinkExtensionSyntax.new])

The GITHUB_WEB extension set renders Markdown similarly to GitHub.

This is different from the GITHUB_FLAVOURED extension set in that GitHub actually renders HTML different from straight GitHub Flavoured Markdown.

(The only difference currently is that GITHUB_WEB renders headers with linkable IDs.)

NONE = ExtensionSet.new([] of BlockSyntax, [] of InlineSyntax)

The NONE extension set renders Markdown similar to Markdown.pl.

However, this set does not render exactly the same as Markdown.pl; rather it is more-or-less the CommonMark standard of Markdown, without fenced code blocks, or inline HTML.

Constructors

new(block_syntaxes : Array(BlockSyntax), inline_syntaxes : Array(InlineSyntax))

Instance methods

block_syntaxes
inline_syntaxes