Repository navigation
Allow escaped characters in IEEEtran DOI note - #24
Merged
Merged
Conversation
Previously, the DOI form of `note` required the link text of `\href`
to be identical to the DOI in the URL. For DOIs containing `_`, such
as `10.1007/11574620_45`, this forced a bare `_` into the link text,
which is typeset as normal text and makes LaTeX fail with `Missing $
inserted` unless the `underscore` package is loaded. Escaping it as
`\_` fixed the compilation, but the linter then reported the `note`
as malformed.
With this change, `check_url_field` unescapes the link text before
comparing it to the DOI in the URL. This covers `\_`, `\#`, `\%`,
`\&`, `\$` as well as `\textasciitilde{}` and `\~{}` for `~`. Tests
for escaped and mismatching link texts are added.
Fixes #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the DOI form of
noterequired the link text of\hrefto be identical to the DOI in the URL. For DOIs containing_, such as10.1007/11574620_45, this forced a bare_into the link text, which is typeset as normal text and makes LaTeX fail withMissing $ insertedunless theunderscorepackage is loaded. Escaping it as\_fixed the compilation, but the linter then reported thenoteas malformed.With this change,
check_url_fieldunescapes the link text before comparing it to the DOI in the URL. This covers\_,\#,\%,\&,\$as well as\textasciitilde{}and\~{}for~. Tests for escaped and mismatching link texts are added.Fixes #23