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

Duplicate predefined counter styles (allows atoms crate to be published) #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion atoms/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() {
}
}
}
include!("../style/counter_style/predefined.rs");
include!("./predefined_counter_styles.rs");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better way to do this would probably be to have the import script duplicate this file into the atoms directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did think about that but this directory doesn't exist at import time either (at least not when calling git filter-repo) because it's not upstream. I suppose we could add a post rebase step to sync and squash this file? But that seems like it might be quite fragile?


atom_type
.atoms(static_atoms.lines().map(Result::unwrap))
Expand Down
66 changes: 66 additions & 0 deletions atoms/predefined_counter_styles.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// THIS FILE IS DUPLICATED FROM style/counter_style/predefined.rs.
// TO UPDATE IT:
// - Run `python style/counter_style/updated_predefined.py`
// - Re-copy style/counter_style/predefined.rs to this location

predefined! {
"decimal",
"decimal-leading-zero",
"arabic-indic",
"armenian",
"upper-armenian",
"lower-armenian",
"bengali",
"cambodian",
"khmer",
"cjk-decimal",
"devanagari",
"georgian",
"gujarati",
"gurmukhi",
"hebrew",
"kannada",
"lao",
"malayalam",
"mongolian",
"myanmar",
"oriya",
"persian",
"lower-roman",
"upper-roman",
"tamil",
"telugu",
"thai",
"tibetan",
"lower-alpha",
"lower-latin",
"upper-alpha",
"upper-latin",
"cjk-earthly-branch",
"cjk-heavenly-stem",
"lower-greek",
"hiragana",
"hiragana-iroha",
"katakana",
"katakana-iroha",
"disc",
"circle",
"square",
"disclosure-open",
"disclosure-closed",
"japanese-informal",
"japanese-formal",
"korean-hangul-formal",
"korean-hanja-informal",
"korean-hanja-formal",
"simp-chinese-informal",
"simp-chinese-formal",
"trad-chinese-informal",
"trad-chinese-formal",
"cjk-ideographic",
"ethiopic-numeric",
}
Loading