From ea8ecc68c6c3082685f5b4bac9d4a6006cb2da87 Mon Sep 17 00:00:00 2001 From: "Kito D. Mann" Date: Tue, 23 Apr 2024 02:16:22 -0400 Subject: [PATCH 1/2] Update syntax-highlighting.adoc to say there can be no blank lines after the itle --- docs/modules/converter/pages/syntax/syntax-highlighting.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/modules/converter/pages/syntax/syntax-highlighting.adoc b/docs/modules/converter/pages/syntax/syntax-highlighting.adoc index e1e9893c..72f7e7c4 100644 --- a/docs/modules/converter/pages/syntax/syntax-highlighting.adoc +++ b/docs/modules/converter/pages/syntax/syntax-highlighting.adoc @@ -11,6 +11,10 @@ You can activate Highlight.js syntax highlighting (disabled by default) by setti :source-highlighter: highlight.js ---- +[NOTE] +==== +There can be no blank lines between the title and the `source-highlighter` attribute. If you insert a blank line, the source highlighter will be ignored. + [NOTE] ==== By default, we are using a prebuilt version of Highlight.js with 34 commonly used languages hosted on {url-cdnjs}[cdnjs]. From 419df95e05b1ae00202333d8030fc49547afee42 Mon Sep 17 00:00:00 2001 From: "Kito D. Mann" Date: Tue, 23 Apr 2024 11:59:55 -0400 Subject: [PATCH 2/2] Update syntax-highlighting.adoc to be more complete when describing the "no blank lines after the title" requirement Co-authored-by: Guillaume Grossetie --- .../converter/pages/syntax/syntax-highlighting.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/modules/converter/pages/syntax/syntax-highlighting.adoc b/docs/modules/converter/pages/syntax/syntax-highlighting.adoc index 72f7e7c4..7f1db9d5 100644 --- a/docs/modules/converter/pages/syntax/syntax-highlighting.adoc +++ b/docs/modules/converter/pages/syntax/syntax-highlighting.adoc @@ -11,10 +11,13 @@ You can activate Highlight.js syntax highlighting (disabled by default) by setti :source-highlighter: highlight.js ---- -[NOTE] +[IMPORTANT] ==== -There can be no blank lines between the title and the `source-highlighter` attribute. If you insert a blank line, the source highlighter will be ignored. +The first empty line in the document marks the end of the header. +In other words, if you declare the `source-highlighter` attribute after an empty line it won't activate syntax highlighting. +Reference: xref:asciidoc:document:header.adoc[] +==== [NOTE] ==== By default, we are using a prebuilt version of Highlight.js with 34 commonly used languages hosted on {url-cdnjs}[cdnjs].