1.0.4
What's new
1.0.4
Syntax from other Markdown flavors (not in CommonMark or GFM, but what other renderers use):
- GitHub's alerts: a quote starting
[!NOTE],[!TIP],[!IMPORTANT],[!WARNING], or[!CAUTION]shows an icon and a colored title, then its text. - Definition lists: a term line, then
: definitionlines. ==Highlight==, shown in a color, andx^2^/H~2~O, shown with Unicode superscript and subscript characters (script_glyphs).- Heading ids:
## Setup {#setup}hides the id, and:GetHeadings(text)lists every heading's level, text, and id, for a table of contents or for handling[links](#setup).
WoW extensions:
- Atlases:
oris shown in the line. - Shortcodes:
:check:,:x:,:question:,:warning:,:gold:,:silver:,:copper:,:tank:,:healer:, and:dps:become icons. Add your own as config keys, like[":myicon:"]. :ShowLinkTooltip(owner, link)and:HideLinkTooltip()show the game's tooltip for links such as[Fireball](spell:133)from a frame's hyperlink scripts.- Game icons:
,, and the same for currencies and achievements show that thing's icon inside the line. - Inline textures:
is shown inside the line instead of as a block.
If rendering fails, :ToHTML() reports the error through WoW's error handler and returns the text as plain
paragraphs, instead of raising the error into the AddOn showing it.
\^, \=, and \: are backslash escapes, for text these would otherwise change.
Faster:
- Rendering is several times faster: a 51 KB news page went from about 450 ms to about 60 ms. Showing a document again with the same settings takes no time at all, since recent renders are kept (changing any setting renders it again).
Blockquotes look like they do in other renderers: left-aligned gray text with a bar at the start of each line
(blockquote_bar), instead of centered yellow text in quote marks between two rules. A quote inside a quote
adds its own bar, and alerts have a bar in their kind's color (admonition_note_bar and so on). SimpleHTML
can't put a bar on the wrapped part of a long line.
Level 4 to 6 headings are told apart from level 3 (SimpleHTML has no smaller heading styles): they're lines at
text size, level 4 in the strong color, level 5 in the strong_em color, and level 6 in gray. The h4, h5, and
h6 settings (with h4_style and so on) change them; h4 = "<h3>", ["/h4"] = "</h3><br />", and
h4_style = false show level 4 as level 3 again.
Also:
- A loose list item's later paragraphs and code start indented under the item's text.
***both***has a color of its own (strong_em), instead of em's color inside strong's.- A blank line ends a blockquote, so two quotes (or alerts) with a blank line between them are two blocks. A
line of just
>still continues a quote.
This mod has no additional files