-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Complete revamp of markdown-gfm #7307
Conversation
ea39da8
to
57e8958
Compare
212f94e
to
13c3e0d
Compare
…res after the recent dependencies upgrade.
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.
Hi @fredck, thanks for contributing to the project!
Sorry, I couldn't resist 😉.
I had to do some code alignment to the what the team is used to so most of my changes are mostly cosmetics:
- We don't use
foo && foo.bar && doSomethingWithFooBar( foo )
due to readability issues. Unfortunately our ESLint allows that: Re-enable no-unused-expressions ESLint rule #7843. - I've moved
RegExp
andescape
definitions out ofTurndownService.prototype.escape
definition - we can define them once, not per everyTurndownService.prototype.escape
call - improved memory management. - I've refactored URL matching to use
String.matchAll()
- IMO it is a nicer API over theRegExp.exec
+do...while
. So just a preference. - To ensure I don't broke anything I've added a test for escaping string between two URLs.
The PR is not ready to be merged yet since I need to fix API docs (I'll explain changes later) - but in short - you can't provide empty @module
jsdoc annotation - it must be a valid "path"-like entry, something like:
/** @module markdown-gfm/html2markdown/html2markdown */
ps.: The merge will happen soon, together with the rest of markdown-related PRs so it should be available in the upcoming release :todo:. |
ps.: The merge will happen soon, together with the rest of markdown-related PRs so it should be available in the upcoming release 🎉. |
The errors are on master as well :/ Merging as plugin has no own errors. |
Suggested merge commit message (convention)
Feature (markdown-gfm): The markdown data processor has been totally revamped and updated to the most recent conversion libraries. Closes #5988.
Additional information
This PR is used in production within GitHub Writer.
The main updates related to this PR are the use of the most up-to-date libraries for markdown conversion:
I've also removed the libraries from inside our code, making them normal dependencies.
One important impact of the updated on the libraries is that many tests started to fail. That's because the libraries are much more standard oriented now and less interested on the markdown-madness of accepting whatever is given.
All in all, the quality of the implementation is definitely higher.
Original PR: ckeditor/ckeditor5-markdown-gfm#29