You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by co...@apache.org on 2026/06/08 17:17:33 UTC
(tinkerpop) 25/27: Syntax-highlight standalone/manual tab blocks in the docs build (tinkerpop-6jq.7)
This is an automated email from the ASF dual-hosted git repository.
Cole-Greer pushed a commit to branch docs-3.7
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 20c668b9d96cdc75f68984f2432e9bccfb5b5307
Author: Cole Greer <co...@colegreer.ca>
AuthorDate: Thu Jun 4 13:48:21 2026 -0700
Syntax-highlight standalone/manual tab blocks in the docs build (tinkerpop-6jq.7)
processStandaloneTabGroup emitted tab code via TabbedHtmlBuilder.codeTab,
which passes the source through verbatim, so standalone [source,<lang>,tab]
groups and manual language-variant tab groups (e.g. the driver-connection
examples in the "Gremlin Server" / connecting-gremlin-server section)
rendered without CodeRay highlighting, unlike the published docs.
Route these blocks through highlightAsSource + codeTabHighlighted, the
same path the gremlin-groovy tabs use. Reference-book CodeRay span count
now matches/exceeds published and the connecting-gremlin-server examples
render with the expected keyword/string/comment highlighting.
Assisted-by: Kiro:claude-opus-4.8 [kiro-cli]
---
CHANGELOG.asciidoc | 1 +
.../java/org/apache/tinkerpop/gremlin/docs/GremlinTreeprocessor.java | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6dc2f95779..898725b565 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Restart the documentation build's Gremlin Console with conflicting plugins excluded per-book (via the `gremlin-docs-plugins-exclude` attribute), so Neo4j (Scala 2.11) and Spark (Scala 2.12) no longer collide on a shared classpath.
* Updated the developer documentation to describe the Maven/AsciidoctorJ documentation build and removed references to the retired shell/AWK preprocessor.
+* Apply syntax highlighting to standalone and manual language-variant tab blocks in the documentation build, matching the highlighting already applied to `gremlin-groovy` tabs.
* Fixed conjoin has incorrect null handling.
* Expanded `gremlin-python` CI matrix to test against Python 3.9, 3.10, 3.11, 3.12, and 3.13.
diff --git a/tools/tinkerpop-docs/src/main/java/org/apache/tinkerpop/gremlin/docs/GremlinTreeprocessor.java b/tools/tinkerpop-docs/src/main/java/org/apache/tinkerpop/gremlin/docs/GremlinTreeprocessor.java
index 8970cc9a7c..8bc60dae87 100644
--- a/tools/tinkerpop-docs/src/main/java/org/apache/tinkerpop/gremlin/docs/GremlinTreeprocessor.java
+++ b/tools/tinkerpop-docs/src/main/java/org/apache/tinkerpop/gremlin/docs/GremlinTreeprocessor.java
@@ -387,7 +387,8 @@ public class GremlinTreeprocessor extends Treeprocessor {
if (isStandaloneTabBlock(block) || isManualTabBlock(block)) {
final Block sourceBlock = (Block) block;
final String lang = getSourceLanguage(sourceBlock);
- tabs.add(TabbedHtmlBuilder.codeTab(lang, sourceBlock.getSource()));
+ tabs.add(TabbedHtmlBuilder.codeTabHighlighted(lang,
+ highlightAsSource(parent, lang, sourceBlock.getSource())));
lastIndex = j;
} else {
break;