-
Notifications
You must be signed in to change notification settings - Fork 594
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
=doc #1290 Remove custom anchors at the start of the page #1308
Conversation
Paradox does not verify them which makes them hard to maintain and removing them will make it easier to merge the Java and Scala documentation by avoiding to need to fix a lot of additional anchors. Generated with: anchors=$(find docs/src/main/paradox/ -name "*.md" | xargs -n 1 head -1 | sed -n 's#<a id="\(.*\)"></a>#\1#p') files=$(find docs/src/main/paradox/ -name "*.md") # Remove fragments from links for id in $anchors; do sed -i "s/#$id[)]/)/" $files; done # Remove top-level page anchors for id in $anchors; do sed -i "/^<a.id=.$id.><.a>$/d" $files; done
Test PASSed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were those anchors ever useful at all? Good to see those gone.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only 3 files with trailing whitespaces!
Good job! I hope you did it with some regex expressions!
|Directive | Description | | ||
|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
|@ref[authenticateBasic](security-directives/authenticateBasic.md) | Wraps the inner route with Http Basic authentication support using a given `Authenticator<T>` | | ||
|@ref[authenticateBasicAsync](security-directives/authenticateBasicAsync.md) | Wraps the inner route with Http Basic authentication support using a given `AsyncAuthenticator<T>` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to find any trailing spaces here nor for the two other cases you pointed out. How can I reveal them? git show
doesn't display a red box at the end of the line as it normally does for trailing spaces.
|directive | behavior | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing space
|directive | behavior | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a trailing space here
Cool! I see you also removed them from the |
@raboof I used this script to do most of the work. It only considers anchors present at the start of any page. anchors=$(find docs/src/main/paradox/ -name "*.md" | xargs -n 1 head -1 | sed -n 's#<a id="\(.*\)"></a>#\1#p')
files=$(find docs/src/main/paradox/ -name "*.md")
# Remove fragments from links
for id in $anchors; do sed -i "s/#$id[)]/)/" $files; done
# Remove top-level page anchors
for id in $anchors; do sed -i "/^<a.id=.$id.><.a>$/d" $files; done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jup that looks good, nice!
Regarding my trailing spaces comments, I think it was just github diff UI that fooled me. |
@jonas ah didn't notice it was in the commit message, too - neat! |
@jlprat 👍 . There are tons of trailing spaces in the documentation though and it might be good to remove them at some point. |
@jrudolph The page-level anchors were never useful, but there because we had to convert all RST references and anchors for correct cross-referencing. I was considering adding some checks to paradox but that never happened. |
Checking references (lightbend/paradox#120) and removing trailing whitespace scalariform-style (lightbend/paradox#103) would indeed be nice! |
@jonas cool, thanks for the clarification. |
Paradox does not verify them which makes them hard to maintain and removing them will make it easier to merge the Java and Scala documentation by avoiding to need to fix a lot of additional anchors.
Refs: #1290