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

Removing rich text formatting from title string #585

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

domiden
Copy link

@domiden domiden commented Feb 28, 2022

Scientific publications are often using (font) formatting such as italic, bold, etc. to satisfy regulations, which are required by specific codices. For example, scientific species names formatted italic, such as "Triticum aestivum subsp. aestivum" (common wheat) or "Berberis spp." To achieve that for the publication title, Zotero allow using rich text formatting based on HTML code. But if titles have been already formatted, ZotFile just remove special characters defined by wildcard.js or a user-specific wildcard have to be implemented, which isn't that user-friendly. It is highly likely, that this user case doesn't concern just a few people, and therefore I suggest including this additional replacement rule into the wildcard.js.

I think, there is no need to include a (GUI) preference option.

Example

Formatted title:

Diversity of <span class="nocase"><i>Puccinia striiformis</i></span> on cereals and grasses

Expected result:

Diversity_of_Puccinia_striiformis_on_cereals_and_grasses

Result with current ZotFile version (1ad811a, 688c423):

Diversity_of_span_class=nocaseiPuccinia_striiformis-i-span_on_cereals_and_grasses

(Where just the special characters ", <, and > have been replaced, but not all the HTML syntax.)

@domiden domiden marked this pull request as ready for review December 24, 2022 13:40
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.

1 participant