Skip to content

Link to Babeljs.io repl incorrect. #240

Closed

Description

@ptrmelko10

The "See full expanded version" link to babeljs.io in content/tutorial/tutorial.md is not interpreting the html character codes for non-alphanumeric characters correctly in production. The link is working correctly when selected from within the markdown file in the repo.

This is what is loaded into babel in production:

<div className%3D"shopping-list">
  <h1>Shopping List for {props.name}<%2Fh1>
  <ul>
    <li>Instagram<%2Fli>
    <li>WhatsApp<%2Fli>
    <li>Oculus<%2Fli>
  <%2Ful>
<%2Fdiv>

Product URL snippet: className%253D%22shopping-list
Markdown URL snippet: className%3D%22shopping-list

Reproduced in:
Google Chrome Version 61.0.3163.100
Google Chrome Version 62.0.3202.75
Firefox 56.0.2

Work around:
Update the code in babel after following the link.

I can probably take a look at this later unless someone else wants to grab this.

Activity

  1. gaearon commented on Nov 3, 2017

    @gaearon
    Member

    Wanna send a fix?

  2. ptrmelko10 commented on Nov 3, 2017

    @ptrmelko10
    Author

    Sure, I'll take a look over the weekend. Do the markdown files go through some sort of build process before it hits production?

  3. bvaughn commented on Nov 3, 2017

    @bvaughn
    Contributor

    Thanks for catching this!

    Do the markdown files go through some sort of build process before it hits production?

    I had an idea (mentioned here) of auto-generating the links during build, but currently they are hard-coded.

  4. bvaughn commented on Nov 3, 2017

    @bvaughn
    Contributor

    This issue is all yours, @ptrmelko10! 😄

    I've added an "in-progress" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

    Cheers!

  5. bvaughn commented on Nov 7, 2017

    @bvaughn
    Contributor

    @ptrmelko10 Have you started on this, by chance? If not I'd like to pick it up. After working on #251 I have a pretty good idea of how we could auto-generate links during build in the way I mentioned.

  6. bvaughn commented on Nov 7, 2017

    @bvaughn
    Contributor

    I'm going to toss up a PR that's related to this, but a bit broader, just because I'm thinking about it at the moment. I'll CC you on it for discussion! 😄

  7. bvaughn commented on Nov 7, 2017

    @bvaughn
    Contributor

    Since my PR fixed a couple of additional issues (not just the one mentioned in this issue) I went ahead and merged it. I hope this is okay and I didn't step on your toes, @ptrmelko10. 🙏 Many apologies if I did.

    Let's chat more if you have any concerns or follow-up suggestions to the approach I took in #255!

  8. ptrmelko10 commented on Nov 7, 2017

    @ptrmelko10
    Author

    @bvaughn it's all good. I didn't get much time to look this over. I'll review #255 since I figured the problem had something to do with gatsby.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions