-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
Add remark-slate source code to Plate #2175
Conversation
🦋 Changeset detectedLatest commit: e382038 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👇 Click on the image for a new way to code review
Legend |
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.
Great! Left a few comments
@zbeyens I've made the requested changes. Element and mark types turned out not to be necessary; I've also refactored the deserialization rules into an options object, which I'll expose in This might be a good time for you to take another look at the code and make sure the coding style is consistent with Plate (should I be using a |
Fixed with |
0d085c5
to
3d83f02
Compare
3d83f02
to
5525c1c
Compare
Never mind, things started breaking again the moment I added
@zbeyens Can you see what's wrong here? I can't tell what's different between this plugin's type and, say, Relevant files: |
@12joan you can abuse of so, |
5525c1c
to
aa05fc6
Compare
Add tests for deserializeMd Add relevent parts of remark-slate Linter fixes Fix function exports Move element types out of options Replace custom types with Plate types Refactor deserialization rules into options Fix blockquotes Drop strikethrough support Fix images Fix code blocks Fix lists Fix <br> Fix generics Make rules configurable through Plate plugin options Fix images (again) Add changesets
aa05fc6
to
e382038
Compare
Description
Fixes #2173
Adds a subset of the remark-slate source code to Plate for ease of modification. To comply with remark-slate's MIT license, I've added @hanford's name to Plate's LICENSE file.
Rather than copy over remark-slate's tests, I've added tests for each element type supported by deserializeMd. A few element types produce incorrectly structured (although mostly still usable) Slate nodes. I'll un-skip the relevant tests once those are fixed.
Until then, this PR is a draft.Ready for merge.To do
Fix strikethroughNot supported by remark-parse<br>