diff --git a/adoc/config/khronos.css b/adoc/config/khronos.css
index 61481f5de..e66358077 100644
--- a/adoc/config/khronos.css
+++ b/adoc/config/khronos.css
@@ -483,20 +483,20 @@ pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
.listingblock.terminal pre .command:not([data-prompt]):before { content: "$"; }
/* Format "[source,role=synopsis]" blocks. This format overrides "listingblock" above. */
-.synopsis > .content {
+.listingblock.synopsis > .content {
position: relative;
display: inline-block;
border: 1px solid #ddd;
}
-.synopsis pre, .synopsis pre[class] {
+.listingblock.synopsis pre, .listingblock.synopsis pre[class] {
padding: 7px 7px 7px 7px;
}
-/* Any "[source,role=synopsis]" blocks with an "id" have an anchor tag inside the
+/* Any "[role=synopsis]" blocks with an "id" have an anchor tag inside the
block's
. (See the "synopsis" Ruby extension script.) Style this as a
- pound sign in the left column that is visible when hovering over the listing
- block. This is similar to the way section headers are styled, but with a
- pound sign instead of a section sign.
+ pound sign in the left column that is visible when hovering over the block.
+ This is similar to the way section headers are styled, but with a pound sign
+ instead of a section sign.
*/
.synopsis > a {
position: absolute;
diff --git a/adoc/config/synopsis/extension.rb b/adoc/config/synopsis/extension.rb
index c95b694f2..f46480578 100644
--- a/adoc/config/synopsis/extension.rb
+++ b/adoc/config/synopsis/extension.rb
@@ -5,30 +5,21 @@
include ::Asciidoctor
-# Add HTML anchors for "[source,role=synopsis,id=X]" blocks, changing the HTML
-# from this:
+# Add HTML anchors for "[role=synopsis,id=X]" blocks, changing the HTML from
+# this:
#
-#
+#
#
# to this:
#
-#
+#
#
#
# Note that this happens only if the block has an "id" attribute.
#
# This extension also relies on some custom CSS styling to turn the anchor into
-# into a section marker that you can click on to get the URL of the synopsis
-# block. See the CSS entries for the class name "synopsis".
-#
-# TODO: It would be nice to create a custom Asciidoc block instead of using the
-# "role=" syntax. This would allow the Asciidoc source to look like:
-#
-# [synopsis,id=X]
-#
-# However, doing this disables the source code highlighting feature. I think
-# this is because the rouge highlighter looks only at [source] blocks, and I
-# cannot find a way to tell it to look at a custom block named [synopsis].
+# into a marker that you can click on to get the URL of the synopsis block. See
+# the CSS entries for the class name "synopsis".
class AddSynopsisAnchors < Extensions::Postprocessor