Line One,
Line Two
was rendered as a single line.
But now it became two lines..
It caused problems on all my posts..T_T
I noticed that this is actually a feature resulting from #222
but it did cause incompatible problems for me.. maybe an option can be provided for users to choose whether to use github-markdown?
Thanks~
Would be good if this would be configurable!
I have the same problem. An option would be nice.
Suggested fixes:
Add this in plugins/renderer/markdown.js:
if (hexo.config.markdown) {
_.extend(opts, hexo.config.markdown);
}
That way, one could add a markdown configuration in the _config.yml:
markdown:
gfm: false
Another suggestion: add renderer options in the front-matter.
Change this in post/render.js (line 101):
render({text: data.content, path: source}, function(err, result){
to:
render({text: data.content, path: source}, data.renderer_options || {}, function(err, result){
Then you can add options in the front-matter of a post:
layout: post
title: "Title"
date: 2012-03-28 22:19
renderer_options:
gfm: false
---
What do you think @tommy351 ?
@floriancargoet Great! I'll try to implement this feature in v2.4.
I've already added this to my local install, tell me if you'd like a pull request.
That was quick :)
Thanks!
Late to the party, but any chance we could have the defaults be set by the main _config file? That way we don't have to have a markdown section in each markdown post.
Feel free to correct me if it already works and I just tried it improperly.
The name of the option in the main _config.yml file is marked.
For instance:
marked:
gfm: true
pedantic: false
sanitize: false
tables: true
breaks: false
smartLists: true
smartypants: false
Can this maybe default to false, like literally everywhere else?
Where is the documentation about marked section as @floriancargoet suggested (it works BTW). I'm not able to find it in hexo docs.
@kflu Rendering is handled by plugins. You'll find the documentation on the plugin's page : https://github.com/hexojs/hexo-renderer-marked
Thanks for the info! It would be nice to have this mentioned in the main doc for those who are not entirely familiar with the Hexo architecture. Rendering is such an important part to deserve a bit mentioning in the main project:)
https://fedidat.com/90-hexo-markdown-line-breaks/
Came across this issue and was still stuck on how to fix, here's a post that helped me. Made a bunch of other already existing posts more neat.
Most helpful comment
Can this maybe default to false, like literally everywhere else?