New Release: league/commonmark 1.5.0
Version 1.5.0 of the league/commonmark Markdown library has just been released!
This will likely be the last minor release of
1.x as we focus efforts on developing 2.0. This post breaks down some of the new features and changes you should know about 1.5.0.
Three New Extensions
The popular Markdown library now includes three more extensions within core thanks for to the community:
Attributes - allows custom HTML attributes like
classto be added to any element from within your Markdown.
- Footnotes - adds the ability to create footnotes in Markdown documents with links and backreferences automatically added for you.
Mentions - makes it easy to parse shortened mentions and references like
@colinodellto a Twitter URL or
#123to a GitHub issue URL. Creating custom mention parsers can be done 100% through configuration, too!
The full list of included extensions was also revamped, making it easier to browse and enable these features in your projects.
Switching between different versions within the documentation site will also keep you on that same topic, making it easier than ever to browse the docs.
Some code examples have also been improved.
The Heading Permalink functionality used to inject SVG icons directly into HTML - this behavior has been changed to instead insert a
¶ symbol by default, making it easier to replace this with a custom icon using CSS. This change does not affect anyone explicitly defining the
inner_contents configuration option. More information on styling these links with icons can be found in the documentation.
Reference objects no longer auto-normalize themselves - the
ReferenceMap now has full responsibility for this. This change should not affect anyone who doesn't directly use those classes in custom code.