Created
June 6, 2016 10:00
-
-
Save waaaaRapy/d9abf54d7db70c7c8d436ae29f07cbae to your computer and use it in GitHub Desktop.
hugo definition-list shortcode
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
{{ $str := print .Inner }} | |
{{ $str := replace $str "<ul>" "<dl>"}} | |
{{ $str := replace $str "</ul>" "</dl>"}} | |
{{ $str := replace $str "<ol>\n<li>" "<dd>" }} | |
{{ $str := replace $str "</li>\n</ol>" "</dd>" }} | |
{{ $str := replace $str "<li>" "<dt>" }} | |
{{ $str := replace $str "</li>" "</dt>" }} | |
{{ markdownify $str }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
is converted to
which rendered as