Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

build_pygments_data: Include zulip specific data in langs.

ryanreh9910559c05eee9
diff --git a/tools/setup/build_pygments_data b/tools/setup/build_pygments_data
index 8391c7ade4a..02bde204630 100755
--- a/tools/setup/build_pygments_data
+++ b/tools/setup/build_pygments_data
@@ -5,10 +5,10 @@ import os
from pygments.lexers import get_all_lexers
ZULIP_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../')
-PRIORITIES_PATH = os.path.join(ZULIP_PATH, 'tools', 'setup', 'lang.json')
+DATA_PATH = os.path.join(ZULIP_PATH, 'tools', 'setup', 'lang.json')
OUT_PATH = os.path.join(ZULIP_PATH, 'static', 'generated', 'pygments_data.json')
-with open(PRIORITIES_PATH) as f:
+with open(DATA_PATH) as f:
priorities = json.load(f)
lexers = get_all_lexers()
@@ -21,5 +21,12 @@ langs = {
for alias in aliases
}
+for name in priorities:
+ if langs.get(name) is None:
+ langs[name] = {
+ 'priority': priorities[name],
+ 'pretty_name': name,
+ }
+
with open(OUT_PATH, 'w') as f:
json.dump({"langs": langs}, f)
diff --git a/version.py b/version.py
index f0914efd525..4984bda7fc5 100644
--- a/version.py
+++ b/version.py
@@ -43,4 +43,4 @@ API_FEATURE_LEVEL = 35
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
-PROVISION_VERSION = '117.3'
+PROVISION_VERSION = '118.0'