-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor html2markdown
and markdown2html
to classes and upgrade turndown
#16372
Refactor html2markdown
and markdown2html
to classes and upgrade turndown
#16372
Conversation
Misses the "Closes" annotations. AFAIK, it closes two tickets, right? |
We didn't plan to bump the lib, AFAIK, the plan was to better tree shake it. |
html2markdown
and markdown2html
to classes.html2markdown
and markdown2html
to classes and upgrade turndown
@@ -273,7 +273,7 @@ describe( 'GFMDataProcessor', () => { | |||
'<p><code>code `` code ```</code></p>', | |||
|
|||
// When converting back ````` will be normalized to ``. | |||
'`code `` code ``` `' | |||
'` code `` code ``` `' |
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.
I tested few html-to-markdown converts available online and they are not consistent. I got the following results when converting <p><code>code `` code ```</code></p>
to markdown:
` code `` code ``` ` (new result)
`code `` code ``` ` (old result)
`code `` code ````
The first two results can be converted back to identical HTML, while the last one is incorrect:
<p><code>code `` code ``` </code></p> (new result)
<p><code>code `` code ``` </code></p> (old result)
<p>`code `` code ````</p>
Because the "before" and "after" results are identical, I think this change is okay.
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.
I tested few html-to-markdown converts available online and they are not consistent.
The GFMD stands for "GitHub Flavored Markdown" so we should be aligned with it.
packages/ckeditor5-markdown-gfm/src/html2markdown/html2markdown.ts
Outdated
Show resolved
Hide resolved
packages/ckeditor5-markdown-gfm/src/html2markdown/html2markdown.ts
Outdated
Show resolved
Hide resolved
packages/ckeditor5-markdown-gfm/src/html2markdown/html2markdown.ts
Outdated
Show resolved
Hide resolved
packages/ckeditor5-markdown-gfm/src/html2markdown/html2markdown.ts
Outdated
Show resolved
Hide resolved
packages/ckeditor5-markdown-gfm/src/markdown2html/markdown2html.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Marta Motyczynska <m.motyczynska@cksource.com>
…tml-processorors-to-classes
@@ -273,7 +273,7 @@ describe( 'GFMDataProcessor', () => { | |||
'<p><code>code `` code ```</code></p>', | |||
|
|||
// When converting back ````` will be normalized to ``. | |||
'`code `` code ``` `' | |||
'` code `` code ``` `' |
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.
I tested few html-to-markdown converts available online and they are not consistent.
The GFMD stands for "GitHub Flavored Markdown" so we should be aligned with it.
Co-authored-by: Kuba Niegowski <1232187+niegowski@users.noreply.github.com>
Suggested merge commit message (convention)
Other (markdown-gfm): Refactor
html2markdown
andmarkdown2html
to classes to improve tree-shaking. Related to #16292.Other (markdown-gfm): Upgrade
turndown
to version7.2.0
. Closes #16371.Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.