Skip to content

Commit

Permalink
Modify javadoc check on spring annotation in README.md (#13012)
Browse files Browse the repository at this point in the history
* Modify javadoc check on spring annotation in README.md

* Update generate_overview_from_readme.py

Relax regex pattern to match all `@` symbols and replacing them with `{@literal @}`. This is safe as Javadoc generation will display all `{@literal @}` as `@`, retaining current display behavior while fixing all erroneous attempts of Javadoc using `@` as a tag reference.

Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
  • Loading branch information
yiliuTo and alzimmermsft authored Jul 10, 2020
1 parent 593440d commit 7d690ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/pipelines/scripts/generate_overview_from_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def generate_overview(readme_file, version):
# markdown2.markdown will create html from the readme.md file. The fenced-code-blocks
# extras being passed into the markdown call is necessary to deal with the embedded
# code blocks within the readme so they'll displaye correctly in the html
html_readme_content = markdown2.markdown(re.sub(pattern='^(\s*)@', repl='\g<1>{@literal @}', string=readme_content, flags=re.MULTILINE), extras=["fenced-code-blocks"])
html_readme_content = markdown2.markdown(re.sub(pattern='@', repl='{@literal @}', string=readme_content, flags=re.MULTILINE), extras=["fenced-code-blocks"])

# Due to javadoc's iFrames the links need to target new tabs otherwise hilarity ensues
soup = BeautifulSoup(html_readme_content, "html.parser")
Expand Down

0 comments on commit 7d690ca

Please sign in to comment.