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

Escape special chars in docs #187

Merged
merged 1 commit into from Jul 5, 2021

Conversation

wcmonty
Copy link
Contributor

@wcmonty wcmonty commented Jul 2, 2021

When generating documentation {bar} in the documentation triggers a warning like:

asciidoctor: WARNING: skipping reference to missing attribute: bar

This is part of the the reason for this issue in the Rubocop repository (although there are other places that this can be seen in other Rubocop repositories).

To test:

# Generate documentation on current master
# We receive some warnings during generation
rubocop-ast git:(wm/escape_references_in_docs) > git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
rubocop-ast git:(master) > asciidoctor -a attribute-missing=warn docs/modules/ROOT/pages/node_types.adoc -o master.html
asciidoctor: WARNING: skipping reference to missing attribute: bar
asciidoctor: WARNING: skipping reference to missing attribute: bar
asciidoctor: WARNING: skipping reference to missing attribute: bar
asciidoctor: WARNING: skipping reference to missing attribute: bar
asciidoctor: WARNING: skipping reference to missing attribute: bar

# Generate documentation on the fix branch
rubocop-ast git:(master) > git checkout wm/escape_references_in_docs
Switched to branch 'wm/escape_references_in_docs'
Your branch is up to date with 'origin/wm/escape_references_in_docs'.
rubocop-ast git:(wm/escape_references_in_docs) > asciidoctor -a attribute-missing=warn docs/modules/ROOT/pages/node_types.adoc -o escaped.html

# We can see that the only difference between the generated files is the timestamp
rubocop-ast git:(wm/escape_references_in_docs) > diff master.html escaped.html
1601c1601
< Last updated 2021-07-02 12:39:33 -0400
---
> Last updated 2021-07-02 12:39:46 -0400

@marcandre marcandre merged commit 0b2445f into rubocop:master Jul 5, 2021
@marcandre
Copy link
Contributor

Great, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants