forked from allejo/jekyll-anchor-headings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to generate ids for headers that do not have them
As commonmark does not generate ids for its headers see, github/cmark-gfm#186 we need the possibility to generate them when creating anchor headings.
- Loading branch information
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
# See: https://github.com/allejo/jekyll-anchor-headings/issues/1 | ||
--- | ||
|
||
{% capture text %} | ||
<h2>Hello world</h2> | ||
{% endcapture %} | ||
|
||
{% include anchor_headings.html html=text generateId=true %} | ||
|
||
<!-- /// --> | ||
|
||
<h2 id="hello-world">Hello world<a href="#heading-1"></a></h2> |