Some markdown syntax difference with GitBook
See original GitHub issueGitBook(Legacy) support code syntax with following syntax
`` ` ``
HonKit does not support it.
Workaround:
<code>`</code>
Probably, this changes is caused by kramed
to @honkit/markup-it
https://github.com/GitbookIO/gitbook-markdown/commit/0981578985933b9e3acd24adcb7cabb7e2c7849b#diff-e8acc63b1e238f3255c900eed37254b8
Related
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Markdown - GitBook Documentation
Markdown is a popular markup syntax that's widely known for its simplicity and popularity online. GitBook supports it as a keyboard-friendly way to...
Read more >GitBook - Markdown Guide
The advantage of GitBook over a tool like Docusaurus is that GitBook takes care of building and hosting the site, and the WYSIWYG...
Read more >GitBook Toolchain Documentation for Multi-Languages.
Markdown supports two different code block styles. One uses lines indented with either four spaces or one tab whereas the other uses lines...
Read more >Markdown Tips & Introduction · GitBook - Zhonghua Zheng
Markdown is a lightweight markup language with plain-text-formatting syntax. Its design allows it to be converted to many output formats, but the original...
Read more >Markdown | GitBook Documentation
GitBook uses the Markdown syntax by default. This is intended as a quick reference and showcase. For more complete info, see John Gruber's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Proposal: Downgrade markdown parser to kramed
Current HonKit has some issues on Markdown parser that is based on
markup-it@2
.We can get more compatibility with GitBook Legacy by downgrading markdown parser. This is temporary action in v3.
Probably, next major version will change it.
Background
Incompatible with GitBook Legacy plugin
Some plugin depended on kramed parser #82
Incompatible with CommonMark
GitBook v4(beta) and HonKit Markdown Parser can not parse CommonMark syntax correctly
For example,
and
kramed
can parse these. Maybe, It ismarked
based parser and it close to CommonMark behaviorAction
@honkit/markdown-legacy
It will improve GitBook(legacy) compatible and It help you to smooth migrate from GitBook.
Future of Markdown parser
In V4 #15 ?
I have two proposals.
Parser plugin https://github.com/honkit/honkit/issues/84
Currently, user can not select parser as plugin. Probably, we can do it.
So, HonKit user will select
@honkit/markdown
or@honkit/markdown-legacy
, or own custom parser. It includes asciidoc parser.If a user want to use gitbook-plugin-uml, the user
@honkit/markdown-legacy
.Rewrite markdown parser with existing markdown parser library
We want to get more CommonMark compatible in the future. I think, It is good that we use remark or Marked. These Markdown parser is compatible with CommonMark and we can add custom sytntax like
# Title {#title-id}
We can not get incentive from original Markdown parser like kramed or markup-it.
📝 Actually, kramed is a fork of old marked
kramed did want to support custom syntax like mathjax. It was the reason for creating kramed.
But GitBook/HonKit has supported mathjax by mathjax plugin. In other words, We not need to extend the parser.
So, We want to get rid of full scratched markdown parser. It make maintaince cost.
📝 Custom parser that is used remark or Marked is needed for basic backward compatible.
https://github.com/honkit/honkit/releases/tag/v3.5.1 releaed. https://github.com/honkit/honkit/releases/tag/v3.5.1 use @honkit/markdown-legacy that is based on GitBook v3 parser.