Skip to content
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

Upgrade remark-parse #260

Closed
wants to merge 1 commit into from
Closed

Upgrade remark-parse #260

wants to merge 1 commit into from

Conversation

rgbkrk
Copy link

@rgbkrk rgbkrk commented Jan 3, 2019

Unsure if this will break things on the react-markdown side. I wanted to see about upgrading remark (xref: nteract/nteract#3483).

@rgbkrk
Copy link
Author

rgbkrk commented Jan 3, 2019

Wow, not a fan of the markup that remark-parse was generating for that unordered list:

    Received value does not match stored snapshot "should handle loose, unordered lists 1".
    - Snapshot
    + Received
      <ul>
        <li>
    -     <p>
    -       foo
    -     </p>
    +     foo
        </li>
        <li>
    -     <p>
    -       bar
    -     </p>
    +     bar
        </li>
      </ul>

EDIT: I read that backwards -- the markup is now cleaner.

@rgbkrk
Copy link
Author

rgbkrk commented Jan 3, 2019

@rexxars would you have a chance to check this out? I upgraded remark-parse and updated the snapshot ✨ .

@rgbkrk
Copy link
Author

rgbkrk commented Jan 3, 2019

Hurrah! It passes!

@rexxars
Copy link
Collaborator

rexxars commented Jan 4, 2019

This is a breaking change, since we are no longer getting a loose property from remark.

Remark has changed their list handling and thus we need to reflect this in our renderers by doing similar to mdast-util-to-hast

This PR currently just handles all lists as if they were "tight", which isn't necessarily what people want.

@rgbkrk
Copy link
Author

rgbkrk commented Jan 4, 2019

Darn. Beyond the other changes necessary, does this mean you'd want to make a major version bump or forgo upgrading remark?

@rexxars
Copy link
Collaborator

rexxars commented Jan 7, 2019

I don't really mind a breaking change if it makes sense, but as far as I can tell the functionality is still possible to reproduce with the latest remark, it just needs to be handled differently. I definitely don't want to remove a feature if it's supported by the underlying stack.

@rgbkrk
Copy link
Author

rgbkrk commented Jan 7, 2019

I'm not sure what the next steps I should take are, so pending further direction I think I'll have to leave this to other contributors.

@rexxars
Copy link
Collaborator

rexxars commented Jun 24, 2019

Thanks for the PR, I'm scheduling the upgrade to remark-parse@6 for v5, which is in a separate branch right now: https://github.com/rexxars/react-markdown/tree/v5

@rexxars rexxars closed this Jun 24, 2019
@rgbkrk rgbkrk deleted the patch-1 branch June 25, 2019 15:33
@rgbkrk
Copy link
Author

rgbkrk commented Jun 25, 2019

Cool, looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants