From 09018ac3058c4b4a699db9d3aad577e670318f5c Mon Sep 17 00:00:00 2001 From: tajmone Date: Sat, 3 Feb 2024 11:54:40 +0100 Subject: [PATCH] Fix Callouts Test Amend the new syntax test for callout lists by providing consecutive callout numbers, so that Asciidoctor can build the HTML document without error. Create a copy of the original test (disjointed numbering sequence) with `.adoc` extension, so that it will be ignored by the Rake task that builds the HTML docs from the test files. --- Tests/lists/syntax_test_Callout-Lists.adoc | 49 +++++++++++++++ .../lists/syntax_test_Callout-Lists.asciidoc | 60 +++++++++---------- docs/index.html | 19 +++--- 3 files changed, 88 insertions(+), 40 deletions(-) create mode 100644 Tests/lists/syntax_test_Callout-Lists.adoc diff --git a/Tests/lists/syntax_test_Callout-Lists.adoc b/Tests/lists/syntax_test_Callout-Lists.adoc new file mode 100644 index 0000000..bbec90a --- /dev/null +++ b/Tests/lists/syntax_test_Callout-Lists.adoc @@ -0,0 +1,49 @@ +// SYNTAX TEST "Packages/ST4-Asciidoctor/Syntaxes/Asciidoctor.sublime-syntax" + +//// +NOTE: This file is excluded from Rake's conversion to HTML because the non +sequential numbering of the callout list fails Asciidoctor conversion. +//// + +[source,ruby] +----------------------- +require 'sinatra' <1> + +get '/hi' do <42> <333> + "Hello World!" +end +----------------------- + +<1> Library import +//<- string.unquoted.list.callout.asciidoc +//<- constant.numeric.callout.asciidoc +//<- punctuation.definition.calloutlistnumber.begin.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc +//^ string.unquoted.list.callout.asciidoc +//^ constant.numeric.callout.asciidoc +//^ punctuation.definition.calloutlistnumber.end.asciidoc +<42> URL mapping +//<- string.unquoted.list.callout.asciidoc +//<- constant.numeric.callout.asciidoc +//<- punctuation.definition.calloutlistnumber.begin.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc +// ^ string.unquoted.list.callout.asciidoc +// ^ constant.numeric.callout.asciidoc +// ^ punctuation.definition.calloutlistnumber.end.asciidoc +<333> Response block +//<- string.unquoted.list.callout.asciidoc +//<- constant.numeric.callout.asciidoc +//<- punctuation.definition.calloutlistnumber.begin.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc + //<- string.unquoted.list.callout.asciidoc + //<- constant.numeric.callout.asciidoc +// ^ string.unquoted.list.callout.asciidoc +// ^ constant.numeric.callout.asciidoc +// ^ punctuation.definition.calloutlistnumber.end.asciidoc diff --git a/Tests/lists/syntax_test_Callout-Lists.asciidoc b/Tests/lists/syntax_test_Callout-Lists.asciidoc index e4980a1..1eaa2a9 100644 --- a/Tests/lists/syntax_test_Callout-Lists.asciidoc +++ b/Tests/lists/syntax_test_Callout-Lists.asciidoc @@ -2,7 +2,7 @@ = Callout List AsciiDoc Documentation reference: -https://docs.asciidoctor.org/asciidoc/latest/verbatim/callouts/[Callout Lists^] +https://docstor.org/asciidoc/latest/verbatim/callouts/[Callout Lists^] == Callout Lists @@ -10,52 +10,52 @@ https://docs.asciidoctor.org/asciidoc/latest/verbatim/callouts/[Callout Lists^] [source,asciidoc] ...................................... +[source,ruby] +----------------------- require 'sinatra' <1> -get '/hi' do <42> <333> +get '/hi' do <2> <3> "Hello World!" end +----------------------- <1> Library import -<42> URL mapping -<333> Response block +<2> URL mapping +<3> Response block ...................................... [.big.red]*Result* +//// +NOTE: In the first test below we're forced to add two spaces indentation before +the callout in order to test each character, due to comment delimiter being +two-chars wide. But that's fine as far as the ST syntax goes... +//// + ====================================== [source,ruby] - +----------------------- require 'sinatra' <1> -get '/hi' do <42> <333> +get '/hi' do <2> <3> "Hello World!" end - -<1> Library import -//<- string.unquoted.list.callout.asciidoc - //<- string.unquoted.list.callout.asciidoc -//^ string.unquoted.list.callout.asciidoc - //<- constant.numeric.callout.asciidoc -//<- punctuation.definition.calloutlistnumber.begin.asciidoc -//^ punctuation.definition.calloutlistnumber.end.asciidoc -<42> URL mapping -//<- string.unquoted.list.callout.asciidoc - //<- string.unquoted.list.callout.asciidoc -//^^ string.unquoted.list.callout.asciidoc - //<- constant.numeric.callout.asciidoc -//^ constant.numeric.callout.asciidoc -//<- punctuation.definition.calloutlistnumber.begin.asciidoc -// ^ punctuation.definition.calloutlistnumber.end.asciidoc -<333> Response block -//<- string.unquoted.list.callout.asciidoc - //<- string.unquoted.list.callout.asciidoc -//^^^ string.unquoted.list.callout.asciidoc - //<- constant.numeric.callout.asciidoc -//^^ constant.numeric.callout.asciidoc -//<- punctuation.definition.calloutlistnumber.begin.asciidoc -// ^ punctuation.definition.calloutlistnumber.end.asciidoc +----------------------- + + <1> Library import +//^^^ string.unquoted.list.callout +//^ punctuation.definition.calloutlistnumber.begin +// ^ constant.numeric.callout +// ^ punctuation.definition.calloutlistnumber.end +<2> URL mapping +//<- string.unquoted.list.callout +//<- constant.numeric.callout +//<- punctuation.definition.calloutlistnumber.begin +<3> Response block +//^ string.unquoted.list.callout +//^ constant.numeric.callout +//^ punctuation.definition.calloutlistnumber.end ====================================== // EOF // diff --git a/docs/index.html b/docs/index.html index e6341aa..7f57207 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - + ST4-Asciidoctor User Guide @@ -85,10 +85,10 @@ ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} ul,ol{margin-left:1.5em} ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} ul.circle{list-style-type:circle} ul.disc{list-style-type:disc} +ul.square{list-style-type:square} +ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit} ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} dl dt{margin-bottom:.3125em;font-weight:bold} dl dd{margin-bottom:1.25em} @@ -209,13 +209,10 @@ .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere} .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em} @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}} @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}} @@ -394,7 +391,7 @@ dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility} h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em} p strong,td.content strong,div.footnote strong{letter-spacing:-.005em} -p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem} +p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem} p{margin-bottom:1.25rem} .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc} @@ -530,7 +527,9 @@

Accessing the User Guide

Package Features

-The list of editing features natively supported by the package. +
+

The list of editing features natively supported by the package.

+