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

Add <p> tags for cdeszaq #121

Merged
merged 1 commit into from
Dec 8, 2016
Merged

Add <p> tags for cdeszaq #121

merged 1 commit into from
Dec 8, 2016

Conversation

jacobtolar
Copy link
Contributor

😈

@jacobtolar
Copy link
Contributor Author

Since I had the script to fix up my changes in #107 I figured I might as well run it on everything.

The simple bash version I used on #107 -

find . \( -name '*.java' -o -name '*.groovy' \)  -exec gsed -i 's/^\(\s*\)\*\s*$/\1* <p>/g' {} \;

Slightly better version that I used here which updates only comments that look like javadocs (probably not perfect, but seems to be sufficient):

https://gist.github.com/jacobtolar/46f03ced47ce6f15c005e8201ba601e1

@cdeszaq
Copy link
Collaborator

cdeszaq commented Dec 8, 2016

So, one interesting note for this: It's not all whitespace in JavaDoc that needs this, only vertical whitespace contained in the description section that needs it. So, this means that there should be a blank line before the @params block, as well as between any other @blah sections (like @returns, for example).

That said, I'm all for this sort of thing. If we can get this to work, I'll happily stuff this into the repo as a script, and add a rule to Checkstyle.

@jacobtolar
Copy link
Contributor Author

This is what I get for not reading the javadocs for javadoc. :)

@jacobtolar
Copy link
Contributor Author

Updated to a significantly smaller changeset -- made a few small changes to the script and then manually staged the valid changes.

@jacobtolar
Copy link
Contributor Author

And -- right, that would be nice, although this particular script would need to be a bit smarter. e.g., it would add <p> tags inside of <pre> blocks, which isn't what you want. Don't think it would be too difficult to make the necessary changes, though.

@cdeszaq
Copy link
Collaborator

cdeszaq commented Dec 8, 2016

Merging. These are Javadoc-only changes, and trivial cleanup ones at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants