File tree Expand file tree Collapse file tree 2 files changed +12
-21
lines changed
Expand file tree Collapse file tree 2 files changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -483,20 +483,20 @@ pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
483483.listingblock .terminal pre .command : not ([data-prompt ]): before { content : "$" ; }
484484
485485/* Format "[source,role=synopsis]" blocks. This format overrides "listingblock" above. */
486- .synopsis > .content {
486+ .listingblock . synopsis > .content {
487487 position : relative;
488488 display : inline-block;
489489 border : 1px solid # ddd ;
490490}
491- .synopsis pre , .synopsis pre [class ] {
491+ .listingblock . synopsis pre , . listingblock .synopsis pre [class ] {
492492 padding : 7px 7px 7px 7px ;
493493}
494494
495- /* Any "[source, role=synopsis]" blocks with an "id" have an anchor tag inside the
495+ /* Any "[role=synopsis]" blocks with an "id" have an anchor tag inside the
496496 block's <div>. (See the "synopsis" Ruby extension script.) Style this as a
497- pound sign in the left column that is visible when hovering over the listing
498- block. This is similar to the way section headers are styled, but with a
499- pound sign instead of a section sign.
497+ pound sign in the left column that is visible when hovering over the block.
498+ This is similar to the way section headers are styled, but with a pound sign
499+ instead of a section sign.
500500*/
501501.synopsis > a {
502502 position : absolute;
Original file line number Diff line number Diff line change 55
66include ::Asciidoctor
77
8- # Add HTML anchors for "[source, role=synopsis,id=X]" blocks, changing the HTML
9- # from this:
8+ # Add HTML anchors for "[role=synopsis,id=X]" blocks, changing the HTML from
9+ # this:
1010#
11- # <div id="X" class="listingblock synopsis">
11+ # <div id="X" class="XX synopsis">
1212#
1313# to this:
1414#
15- # <div id="X" class="listingblock synopsis">
15+ # <div id="X" class="XX synopsis">
1616# <a href="#X"></a>
1717#
1818# Note that this happens only if the block has an "id" attribute.
1919#
2020# This extension also relies on some custom CSS styling to turn the anchor into
21- # into a section marker that you can click on to get the URL of the synopsis
22- # block. See the CSS entries for the class name "synopsis".
23- #
24- # TODO: It would be nice to create a custom Asciidoc block instead of using the
25- # "role=" syntax. This would allow the Asciidoc source to look like:
26- #
27- # [synopsis,id=X]
28- #
29- # However, doing this disables the source code highlighting feature. I think
30- # this is because the rouge highlighter looks only at [source] blocks, and I
31- # cannot find a way to tell it to look at a custom block named [synopsis].
21+ # into a marker that you can click on to get the URL of the synopsis block. See
22+ # the CSS entries for the class name "synopsis".
3223
3324class AddSynopsisAnchors < Extensions ::Postprocessor
3425
You can’t perform that action at this time.
0 commit comments