Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation issues in description lists with tagged regions #1876

Open
lcawl opened this issue Jun 25, 2020 · 0 comments
Open

Indentation issues in description lists with tagged regions #1876

lcawl opened this issue Jun 25, 2020 · 0 comments
Labels
asciidoc Asciidoc and our Asciidoctor extensions bug Something that does not look or behave correctly

Comments

@lcawl
Copy link
Contributor

lcawl commented Jun 25, 2020

I think there is a bug in the indentations within description lists. For example, while playing with the Glossary in elastic/stack-docs#1214, I noticed this:

image

Notice that the description of the first item in the "L" description list (in this case, "leader index") is not indented. [I don't think this bug is specific to our build tools, since the same thing happens when I build via Asciidoctor directly (e.g. asciidoctor stack-docs/docs/en/stack/index-landinall.adoc -r asciidoctor-diagram -a data-uri -D output/docs)].

The specific scenario where this seems to happen is when you're including content from tagged regions in the first item in the description list. Subsequent items have no such indentation issues. For example, here's an example of the source that hits this problem:

[[l-glos]] L::

[[glossary-leader-index]] leader index:::
+
--
include::{es-repo-dir}/glossary.asciidoc[tag=leader-index-def]
--

[[glossary-local-cluster]] local cluster:::
+
--
include::{es-repo-dir}/glossary.asciidoc[tag=local-cluster-def]
--

When you look at the output, you can see that the nesting of dl for the first item doesn't match the second item (i.e. it's nested incorrectly):

<dt>
--
  | <span class="term">
  | <a id="l-glos"></a> L
  | </span>
  | </dt>
  | <dd>
  | <div class="variablelist">
  | <dl class="variablelist">
  | <dt>
  | <span class="term">
  | <a id="glossary-leader-index"></a> leader index
  | </span>
  | </dt>
  | </dl>
  | </div>
  | <p>The source index for <a class="xref" href="terms.html#glossary-ccr">cross-cluster replication</a>. A leader index exists
  | on a remote cluster and is replicated to
  | <a class="xref" href="terms.html#glossary-follower-index">follower indices</a>.</p>
  | <div class="variablelist">
  | <dl class="variablelist">
  | <dt>
  | <span class="term">
  | <a id="glossary-local-cluster"></a> local cluster
  | </span>
  | </dt>
  | <dd>
  | <p>The cluster that pulls data from a <a class="xref" href="terms.html#glossary-remote-cluster">remote cluster</a> in cross-cluster search or cross-cluster replication.</p>
  | </dd>
  | </dl>
  | </div>
  | </dd>
  | <dt>

I am going to move away from using description lists this way in the glossary, since I find these indentation issues off-putting. I think it's worth investigating, however, in case this is a real bug that's worth fixing.

@lcawl lcawl added the bug Something that does not look or behave correctly label Jun 25, 2020
@gtback gtback added the asciidoc Asciidoc and our Asciidoctor extensions label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asciidoc Asciidoc and our Asciidoctor extensions bug Something that does not look or behave correctly
Projects
None yet
Development

No branches or pull requests

2 participants