-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
2.x: Correct marble diagram dimensions #5087
2.x: Correct marble diagram dimensions #5087
Conversation
This fixes part of #4535. These changes were generated using the following script: ```sh #!/usr/bin/env bash find . -name '*.java' -print0 \ | xargs -0 grep '^\s*\*' \ | grep -oP 'https.*?\.png' \ | sort -u \ | while read -r I; do echo "Updating ${I}..." # Gather image details. DATA="$(identify <(curl -f -L -s "${I}"))" # Extract the image's true width and height. WIDTH="$(echo "${DATA}" | grep -oP '(?<=PNG )\d+')" HEIGHT="$(echo "${DATA}" | grep -oP 'PNG \d+x\d+' | grep -oP '(?<=x)\d+')" # Determine the image's scaled height, assuming a width of 640 pixels. NEW_HEIGHT="$(echo 'scale=100; s='"${WIDTH}"' / 640; scale=0; '"${HEIGHT}"' / s' | bc)" # Update all `<img/>` tags referencing the image. find . -name '*.java' -print0 \ | xargs -0 perl -i -p -e 's,<img( (width|height)="[^"]*")* src="\Q'"${I}"'\E",<img width="640" height="'"${NEW_HEIGHT}"'" src="'"${I}"'",g' done ```
(Note that I assumed that it's okay to just fix the width of all images at 640px; that seemed to be the prevailing style.) |
Great scripting job! |
Thanks! :). Since the change only touches JavaDoc, I assume the Travis CI job failure is spurious/unrelated? Otherwise I'll need a pointer on how to correct the situation. |
The failure is due to time sensitive tests failing on an overloaded CI. I'll try to resolve it separately, don't worry about it. |
Codecov Report@@ Coverage Diff @@
## 2.x #5087 +/- ##
============================================
+ Coverage 95.51% 95.59% +0.07%
- Complexity 5547 5550 +3
============================================
Files 614 614
Lines 39580 39580
Branches 5559 5559
============================================
+ Hits 37805 37836 +31
+ Misses 778 758 -20
+ Partials 997 986 -11
Continue to review full report at Codecov.
|
This fixes part of #4535, as requested in #5067.
These changes were generated using the following script: