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

fix: don't escape html tags inside of inline code in release notes #2367

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

mehalter
Copy link
Contributor

@mehalter mehalter commented Aug 30, 2024

This makes sure to only escape HTML tags that are not within inline code blocks as these are handled explicitly and not rendered the same way they are outside of code blocks.

Fixes #2366 🦕

Example, a commit such as the following:

feat: render all imagesets as <picture> `<picture>` `` `<picture>` ``

would render as the following markdown:

render all imagesets as <picture> <picture> `<picture>`

@mehalter mehalter requested review from a team as code owners August 30, 2024 22:58
Copy link

google-cla bot commented Aug 30, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Aug 30, 2024
@mehalter mehalter force-pushed the html-escape-fix branch 3 times, most recently from 965c61b to e4f9301 Compare September 4, 2024 20:24
@mehalter
Copy link
Contributor Author

mehalter commented Sep 4, 2024

I updated the commits to follow the markdown syntax exactly for inline code including inline code blocks that contain ` characters. I also made sure all tests still pass along with adding a new test to fully validate the rest of the possible HTML escaping situations. This should be ready for review 🥳

Thanks so much for such a great project and I'm excited to be able to help contribute!

@chingor13 chingor13 merged commit a41d137 into googleapis:main Sep 11, 2024
11 checks passed
@mehalter mehalter deleted the html-escape-fix branch September 11, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML tags are incorrectly escaped within code blocks resulting in improper markdown
2 participants