This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new ced33ae5 Use GFM instead of CommonMark Markdown for the documentation
ced33ae5 is described below
commit ced33ae5b5b6c07d65880ead6343e85646951a03
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Mar 10 20:55:13 2026 +0000
Use GFM instead of CommonMark Markdown for the documentation
---
Dockerfile.alpine | 1 -
Makefile | 4 ++--
scripts/gfm_to_html.py | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 4c10596b..8207bdd1 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -8,7 +8,6 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
RUN apk update && \
apk add --no-cache \
- cmark \
git \
make \
patch
diff --git a/Makefile b/Makefile
index e152b257..dbe26435 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ build-docs:
mkdir -p docs
rm -f docs/*.html
uv run --frozen python3 scripts/docs_build.py
- for fn in atr/docs/*.md; do out=$${fn#atr/}; cmark "$$fn" >
"$${out%.md}.html"; done
+ for fn in atr/docs/*.md; do out=$${fn#atr/}; uv run --frozen python3
scripts/gfm_to_html.py "$$fn" "$${out%.md}.html"; done
uv run --frozen python3 scripts/docs_post_process.py docs/*.html
build-playwright:
@@ -75,7 +75,7 @@ docs:
uv run --frozen python3 scripts/docs_check.py
rm -f docs/*.html
uv run --frozen python3 scripts/docs_build.py
- for fn in atr/docs/*.md; do out=$${fn#atr/}; cmark "$$fn" >
"$${out%.md}.html"; done
+ for fn in atr/docs/*.md; do out=$${fn#atr/}; uv run --frozen python3
scripts/gfm_to_html.py "$$fn" "$${out%.md}.html"; done
uv run --frozen python3 scripts/docs_post_process.py docs/*.html
uv run --frozen python3 scripts/docs_check.py
diff --git a/scripts/gfm_to_html.py b/scripts/gfm_to_html.py
new file mode 100755
index 00000000..96552ff9
--- /dev/null
+++ b/scripts/gfm_to_html.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import pathlib
+import sys
+
+import cmarkgfm
+
+
+def main() -> None:
+ if len(sys.argv) < 3:
+ print("Usage: gfm_to_html.py <input.md> <output.html>")
+ sys.exit(1)
+
+ input_path = pathlib.Path(sys.argv[1])
+ output_path = pathlib.Path(sys.argv[2])
+
+ markdown = input_path.read_text(encoding="utf-8")
+ html = cmarkgfm.github_flavored_markdown_to_html(markdown)
+ output_path.write_text(html, encoding="utf-8")
+
+
+if __name__ == "__main__":
+ main()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]