Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve display of AsciiDoc examples with titles (mmistakes#944)
The jekyll-asciidoc plugin will take AsciiDoc markup like this: .A method that returns the string "Hello, world" [example] [source,ruby] ---- def hello "Hello, world" end ---- And produce HTML like this (syntax highlighting disabled): <div class="listingblock"> <div class="title">A method that returns the string "Hello, world"</div> <div class="content"> <pre class="highlight"><code class="language-ruby" data-lang="ruby">def hello "Hello, world" end</code></pre> </div> </div> Previously, because we were applying code block styling to the whole listingblock, the title would be rendered as normal body text, inside the code block, which did not look good. With this change, it will instead be rendered similarly to a Just The Docs rendered example — the title will appear where the rendered example usually would. Co-authored-by: Matt Wang <matt@matthewwang.me>
- Loading branch information