Skip to content

fix: Specify exact regex when adding in h2 tags for title#136

Merged
lqiu96 merged 4 commits intogoogleapis:mainfrom
lqiu96:fix_regex
Jul 19, 2022
Merged

fix: Specify exact regex when adding in h2 tags for title#136
lqiu96 merged 4 commits intogoogleapis:mainfrom
lqiu96:fix_regex

Conversation

@lqiu96
Copy link
Copy Markdown
Member

@lqiu96 lqiu96 commented Jul 19, 2022

Fixes #135

It's a good idea to open an issue first for discussion.

  • [ x ] Tests pass
  • [ x ] Appropriate changes to README are included in PR

@lqiu96 lqiu96 requested a review from a team July 19, 2022 14:59
@lqiu96 lqiu96 changed the title Fix regex adding in h2 tags fix: Specify exact regex when adding in h2 tags for title Jul 19, 2022
suztomo
suztomo previously approved these changes Jul 19, 2022
assertEquals(expectedResult + random + expectedResult, YamlUtil.cleanupHtml(expectedActual + random + expectedActual));

assertEquals("= text =", YamlUtil.cleanupHtml("= text ="));
assertEquals("==testing==", YamlUtil.cleanupHtml("==testing=="));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put "scikit-learn":"==0.19.0" thing as a test case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes! I'll add that

assertEquals("= text =", YamlUtil.cleanupHtml("= text ="));
assertEquals("==testing==", YamlUtil.cleanupHtml("==testing=="));
assertEquals("=======================SpeechClient=======================", "=======================SpeechClient=======================");
assertEquals("\"scikit-learn\":\"==0.19.0\"TextTextText\"botocore\":\"==1.7.14\"", "\"scikit-learn\":\"==0.19.0\"TextTextText\"botocore\":\"==1.7.14\"");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@lqiu96 lqiu96 merged commit 13291fb into googleapis:main Jul 19, 2022
@lqiu96 lqiu96 deleted the fix_regex branch July 19, 2022 17:51
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.

Cleanup HTML functionality adding in unnecessary H2 tags

2 participants