Skip to content

Commit 9009bf1

Browse files
committed
2 parents 1fa4feb + a665468 commit 9009bf1

File tree

1,466 files changed

+201963
-173032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,466 files changed

+201963
-173032
lines changed

scripts/new_style.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import argparse
2-
from pathlib import Path
32
import re
43
import shutil
5-
4+
from pathlib import Path
65

76
DEFAULT_BASE_STYLE = "gb-t-7714-2015-numeric-bilingual-no-uppercase-no-url-doi"
87

98

109
def make_style_id(style_name: str):
11-
style_id = style_name.lower()
12-
style_id = style_id.replace("&", " and ")
13-
style_id = re.sub(r"[^0-9A-Za-z]+", "-", style_id)
10+
style_id = style_name.replace(" ", "-")
11+
style_id = style_id.replace("/", "-")
12+
style_id = re.sub(r"-+", "-", style_id)
1413
style_id = re.sub(r"^-*", "", style_id)
1514
style_id = re.sub(r"-*$", "", style_id)
1615
return style_id

0 commit comments

Comments
 (0)