- Represent attrs as map instead of list, ie:
%{"num_backticks" => 1, "literal" => ":elixir"}
instead of[{"num_backticks", 1}, {"literal", ":elixir"}]
. - Removed
MDEx.attribute/2
in favor of pattern matching key/value pairs in the attrs map directly.
to_html/1
andto_html/2
now returns{:ok, String.t()}
or{:error, %MDEx.DecodeError{}}
instead of justString.t()
. The reason is because now they may accept an AST as input which may cause decoding errors. Replace withto_html!/1
andto_html!/2
to have the same behavior as before.
- Fix misspelling of
thematic
causing render errors - #73 by @jonklein
- Added
to_commonmark/1
andto_commonmark/2
to convert an AST to CommonMark - #70 by @jonklein - Added
~M
sigil (no interpolation) withAST
andMD
modifiers (defaults to HTML without the modifier) - Added
~m
sigil (supports interpolation and escaping) withAST
andMD
modifiers (defaults to HTML without the modifier) - Added
parse_document/1
andparse_document/2
to parse Markdown to AST - Added low-level functions
traverse_and_update/2
andattribute/2
to manipulate AST - Added
to_html!/1
andto_html!/2
, the raising version ofto_html/1
andto_html/2
(similar to previousto_html/1
andto_html/2
) - Changed
to_html/1
andto_html/2
to accept AST as input - Added examples directory to show how to use the new APIs
- Bump comrak from 0.24.1 to 0.26.0
- Add new
extension
options: underline, spoiler, greentext - Add new
render
options: experimental_inline_sourcepos, escaped_char_spans, ignore_setext, ignore_empty_links, gfm_quirks, prefer_fenced
- Relax minimum required Elixir version to 1.13
- Bump comrak to 0.24.1
- Bump ammonia to 4.0
- Add new
extension
options: multiline_block_quotes, math_dollars, math_code, shortcodes, wikilinks_title_after_pipe, wikilinks_title_before_pipe - Add new
render
option: escaped_char_spans - Add new option
features.syntax_highlight_inline_style
to control whether to embed inline styles or not. Default istrue
.
- Build binaries on MacOS 12
- Added language
objc
to syntax highlighter.
- Update rustler to
~> 0.32
- Update rustler_precompiled
~> 0.7
- Added legacy targets
- Minimum required Elixir version is now 1.14
- Removed target
arm-unknown-linux-gnueabihf
- Removed target
riscv64gc-unknown-linux-gnu
- [Syntax Highlight] Renamed parent
<pre>
class fromautumn-highlight
toautumn-hl
- [Syntax Highlight] Added prefix
ahl-
to each scope class
- Update autumn to 0.2.2 (#33)
- Update comrak to 0.20.0 (#27) - @supernintendo
- Update autumn themes to add base16-tomorrow and base16-tomorrow-night - @paradox460
- Comrak docs links
- Add languages: jsx, tsx, vim
- Bump injket v0.10.2
- Syntax highlighting - remove newlines to avoid formatting incorrectly
- Add translate="no" attr in
<code>
tag
- Fix Javascript syntax highlight
- Fix Typescript syntax highlight
- Add logo
- Add icon
- Fallback to plain text on invalid language
- Syntax highlight injections
- Add samples
- Syntax highlight code using tree-sitter and helix editor themes. Use https://github.com/leandrocp/autumn/tree/main/native/inkjet_nif under the hood.
- Load extra themes and syntaxes with https://crates.io/crates/two-face
- Sanitize output with https://crates.io/crates/ammonia
- Syntax Highlight with https://crates.io/crates/syntect
- Compile on Ubuntu 20 to fix libc version mismatch
- NIF version 2.15
- Guard markdown arg
- specs
- Update Rust to edition 2021
- Add
@spec
to public functions
MDEx.to_html/1
to convert Markdown to HTML using default options.MDEx.to_html/2
to convert Markdown to HTML using custom options.