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

Fix regex in api_xrefs #728

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

etomzak
Copy link
Contributor

@etomzak etomzak commented Feb 14, 2025

Based on line 72, I think the intent was always that - would be a valid character for api-xrefs IDs (even though it's not a valid character for C++ identifiers). Prior to this fix, API IDs with - characters (e.g., [api]#my-api# in asciidoc) were silently not getting the href treatment, because they were missed by the regex on line 117. I.e., [api]#my_api# would get a link in the HTML, [api]#my-api# would not, and no error was generated.

This took a while to debug.

Caveat: I know nothing about Ruby.

@etomzak etomzak added the editorial Some purely editorial problem label Feb 14, 2025
@TApplencourt
Copy link
Contributor

Make sense \w == [a-zA-Z0-9_]; honestly, I think \S*? (aka everything that is not space) will work best.

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

Successfully merging this pull request may close these issues.

2 participants