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

Modify javadoc check on spring annotation in README.md #13012

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Modify javadoc check on spring annotation in README.md
  • Loading branch information
yiliuTo committed Jul 10, 2020
commit 665fcf6bc652a1b923d9ddee3d693a7c781cc4f7
1 change: 1 addition & 0 deletions eng/pipelines/scripts/generate_overview_from_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +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
readme_content = markdown2.markdown(re.sub(pattern='{@', repl='{{@literal @}', string=readme_content), extras=["fenced-code-blocks"])
Copy link
Member

Choose a reason for hiding this comment

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

@yiliuTo why are we making change? Literally, the line below this is doing the same thing. That change was checked in by @alzimmermsft with this PR.

Copy link
Member

Choose a reason for hiding this comment

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

@JimSuplizio - if @alzimmermsft 's change is working correctly, how come I am still seeing the java docs issue on this PR ?
#12964

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is similar to the PR mentioned, but this is making the check more flexible to cover additional replacing scenarios. Made a commit to the PR to make the regex match all @s and replacing them with the Javadoc safe {@literal @}.

html_readme_content = markdown2.markdown(re.sub(pattern='^(\s*)@', repl='\g<1>{@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
Expand Down