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 - prohibit whitespaces in footnotes #6

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

Conversation

davidkopp
Copy link

I had the problem that a footnote definition was recognized even though it wasn't one and therefore the entire algorithm no longer worked.

Example text:

The GHG Protocol[^1] is an internationally recognized standard for measuring and reporting greenhouse gas emissions, for entire companies or just for individual products. The emissions are divided into three scopes [[@WorldResourcesInstitute.2011.GHGScopeStandard]]:

The regex should only match the 1, but it matched everything until the colon:

1] is an internationally recognized standard for measuring and reporting greenhouse gas emissions, for entire companies or just for individual products. The emissions are divided into three scopes [[@WorldResourcesInstitute.2011.GHGScopeStandard]

This PR fixes that by allowing only footnote characters that are not whitespace.

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

1 participant