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

feat(gatsby-transformer-remark): support raw HTML in markdown excerpts #10499

Merged
merged 4 commits into from
Jan 1, 2019

Conversation

nadrane
Copy link
Contributor

@nadrane nadrane commented Dec 17, 2018

fix issue #10498

The first commit was to fix some tests that were just totally not working. We weren't correctly passing around all of our pluginOptions.

The second commit added a test that validated that code tags worked at all. Mostly a sanity check for me. Doesn't add a ton of value overall.

The third commit the fix.

One thing to note here is that I don't actually have a test for this issue. Off the top of my head, I'm not 100% sure how to test it. Maybe inserting raw HTML into the excerpt and expecting it to not get escaped would work?

EDIT: Just added a test that makes sure we can render raw html in excerpts and replaced the less useful test from before.

@nadrane nadrane changed the title Fix issue #10498 Support raw HTML in markdown excerpts Dec 17, 2018
@nadrane
Copy link
Contributor Author

nadrane commented Dec 18, 2018

@DSchau Any chance you be my reviewer again? :)

I think this should be a pretty straight-forward one

@DSchau
Copy link
Contributor

DSchau commented Dec 18, 2018

Will do! I’ll check this out tomorrow morning!

@DSchau
Copy link
Contributor

DSchau commented Dec 18, 2018

@nadrane ugh, sorry--didn't get to this today.

One thing I thought would be helpful is updating examples/using-remark with this new behavior. Any interest in doing that? Tangential to this PR, but it'll "integration" test it as well as providing a helpful resource to some.

@nadrane
Copy link
Contributor Author

nadrane commented Dec 19, 2018

Yeah I can definitely do that. Are you thinking I would just add a markdown document that uses raw html?

@DSchau
Copy link
Contributor

DSchau commented Dec 19, 2018

@nadrane exactly, yeah! Not a blocker for this PR by any means, but it's a nice thing to show/document!

@nadrane
Copy link
Contributor Author

nadrane commented Dec 30, 2018

@DSchau Hey, when you have a moment, I would love to get this guy reviewed :)

@magicmatatjahu
Copy link

magicmatatjahu commented Dec 31, 2018

Hi @DSchau and @nadrane.
Firstly, great work with this PR @nadrane, because we have in our product also problem with raw html in excerpt section :)
@DSchau can you check this PR? 😃

BTW. First I wanted to fix this error myself, only later I started to look for issue for related problem and therefore I have a proposal: @DSchau Have you thought about creating labels for plugins, for example plugins/transform-remark? Surely, the issues reported would be faster to find.

@DSchau
Copy link
Contributor

DSchau commented Jan 1, 2019

BTW. First I wanted to fix this error myself, only later I started to look for issue for related problem and therefore I have a proposal: @DSchau Have you thought about creating labels for plugins, for example plugins/transform-remark? Surely, the issues reported would be faster to find.

Sure--this seems reasonable! I'll make a note of it and circle back with the team to see if it makes sense. Thanks!

As far as this PR goes--last I recall it was ready to go. An example (e.g. using-remark) would be nice to have but not necessary as I said earlier!

For now--let's just get this merged, and we can add that example at some later date. Thanks!

@DSchau DSchau changed the title Support raw HTML in markdown excerpts feat(gatsby-transformer-remark): support raw HTML in markdown excerpts Jan 1, 2019
@DSchau DSchau merged commit 29a8c5c into gatsbyjs:master Jan 1, 2019
@DSchau
Copy link
Contributor

DSchau commented Jan 1, 2019

Successfully published:
 - [email protected]

gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
gatsbyjs#10499)

fix issue gatsbyjs#10498 

The first commit was to fix some tests that were just totally not working. We weren't correctly passing around all of our pluginOptions.

The second commit added a test that validated that `code` tags worked at all. Mostly a sanity check for me. Doesn't add a ton of value overall.

The third commit the fix.

One thing to note here is that I don't actually have a test for this issue. Off the top of my head, I'm not 100% sure how to test it. Maybe inserting raw HTML into the excerpt and expecting it to not get escaped would work?

EDIT: Just added a test that makes sure we can render raw html in excerpts and replaced the less useful test from before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants