eab0922a2d
https://forums.zotero.org/discussion/113653/zotero-7-beta-incorrect-behaviour-applying-title-case-action-to-titles-with-rich-text-markup For `<i>Title case</i>`, return `<i>Title Case</i>` instead of `<i>title Case</I>`. |
||
---|---|---|
.github/workflows | ||
resource | ||
test | ||
.gitignore | ||
.gitmodules | ||
COPYING | ||
README.md | ||
cachedTypes.js | ||
date.js | ||
openurl.js | ||
package-lock.json | ||
package.json | ||
schema.js | ||
utilities.js | ||
utilities_item.js | ||
xregexp-all.js | ||
xregexp-unicode-zotero.js |
README.md
Zotero Utilities
Zotero utility code common across various codebases such as the Zotero client, Zotero translation architecture and others.
Item utility functions require:
- Calling
Zotero.Schema.init(json)
with the JSON fromschema.json
from Zotero schema repo - Calling
Zotero.Date.init(json)
with the JSON fromresource/dateFormats.json
- Loading
resource/zoteroTypeSchemaData.js
beforecachedTypes.js
or in Node.js runninglet CachedTypes = require('./cachedTypes') CachedTypes.setTypeSchema(require('./resource/zoteroTypeSchemaData'))
- Implementing
Zotero.localeCompare()
; a simple implementation would belet collator = new Intl.Collator(['en-US'], { numeric: true, sensitivity: 'base' }); Zotero.localeCompare = (a, b) => collator.compare(a, b);
Please bundle the Zotero schema file with your repository, do not load it remotely.
To run tests: npm i && npm test
.