PHPnews.io

New Release: league/commonmark 1.5.0

Written by colinodell.com - Blog / Original link on Jun. 21, 2020

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:

Improved Documentation

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.

Changes

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.

Also, the 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.

More Details

As always, check out the changelog and upgrade guide for more information on leveraging the new version.

colinodell

« The Sound of Silence - Debugbar vs Telescope Toolbar »