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

[Bug] 标题首字母大写时不应该小写°C的C #263

Closed
1 task done
pencilheart opened this issue Jan 15, 2025 · 6 comments
Closed
1 task done

[Bug] 标题首字母大写时不应该小写°C的C #263

pencilheart opened this issue Jan 15, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@pencilheart
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

  • OS:macOS 15.2
  • Zotero Version:7.0.11
  • Addon Version:1.22.4

Describe the bug

标题设置为“首字母大写”时°C的C会被小写,此举不该,应该保留C为大写。是否可以设置保留?

Anything else?

No response

@pencilheart pencilheart added the bug Something isn't working label Jan 15, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Needs Triage in @northword's Zotero Jan 15, 2025
@northword
Copy link
Owner

我无法复现呢,你的 °C 之间是否包含了空格?

example:

测试 "条目" <i>AcPME</i>嗷嗷 《aa》A dgreec °C Aaa

before:

PixPin_2025-01-15_16-01-04

after:

PixPin_2025-01-15_15-59-11

@pencilheart
Copy link
Author

不包含空格的,点击标题句首大写后就会变成小写。1200 °C

2025-01-15.19.21.22.mp4

This comment was marked as resolved.

@northword
Copy link
Owner

当标题只含有 1200 °C 时,这是预期的,因为会被识别为全大写,当还有其他单词时,应可以正常处理。

@northword northword reopened this Jan 15, 2025
northword added a commit that referenced this issue Jan 15, 2025
@pencilheart
Copy link
Author

确实,插件涉及的“句首大写”是这样。原生的存在一个问题:点击“标题大写”后C会变成c。可能是来回切换操作时导致了此issue。感谢!

2025-01-15.21.28.10.mp4

@northword
Copy link
Owner

原生的这个我也发现了,估计也是因为识别成了全大写的原因,可能是 https://github.com/zotero/utilities/blob/31c45a2f9642bdf75375ea17411680a5b7808e64/utilities.js#L1097-L1122 没细看。

插件涉及的句首大写大部分代码是基于原生的,只是在原生的基础上增加了化学式、年月地名等和自定义术语,所以理论上除了这些特例的,插件是和原生保持一致的(原生也会把 1200 °C 改为 1200 °c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants