Disable hard_wrap in kramdown-parser-gfm #518
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
hard_wrap
option is set to true by default which results in newlines within paragraphs being rendered as<br/>
in HTML. This was causing a number of our pages (e.g. week-826) to be rendered differently since switching from the default kramdown renderer to the GFM renderer in 2444225.I used the
rake spec:regression:artefacts
task to compare the rendered site with and without this option, and with the default kramdown renderer and I'm happy that the behaviour in this commit is closer to what we had originally. The only obvious change I can now see between the default kramdown renderer and the GFM renderer is that some automatically generated heading IDs are different but I'm happy to live with that.The screenshots below show the difference in setting the
hard_wrap
option:With
hard_wrap
set to trueWith
hard_wrap
set to false