-
Notifications
You must be signed in to change notification settings - Fork 6
use kramdown renderer instead of redcarpet #568
base: develop
Are you sure you want to change the base?
Conversation
# @toc_depth indicates the range of the TOC which defaults to rendering | ||
# nothing. | ||
# http://kramdown.gettalong.org/converter/html.html#toc | ||
toc_header = "* TOC\n{:toc}\n\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small thing but maybe worth setting this as a constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
@@ -1,8 +1,11 @@ | |||
-# DEPRECATED - TOC is generated as part of content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove entirely now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - will be in our commit history if we ever want something similar to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding/updating specs for the node decorator and the markdown renderer?
@@ -0,0 +1,89 @@ | |||
module Kramdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this all boilerplate or so I need to review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nav_wrapped
method is the only thing that isn't boilerplate.
Fair question - the specs have been updated to work with these changes, but the output hasn't changed. I could add some additional tests for the |
Yeah up to you but I think the specs for the markdown renderer would be a good improvement. |
This PR uses Kramdown instead of RedCarpet as the markdown renderer.
This gives authors the ability to use definition lists.
Due to the way that Kramdown compiles its documents, table-of-contents are refactored out as a separate explicit template specification, and are instead compiled as part of the content itself. An inline specification is used to inject the TOC at the head of the document's contents.
Note: various content-tests have been refactored to suit the kramdown markdown syntax for headings, which requires that a heading is preceded by a blank line.