Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-23484

Investigate/fix YAML Callout Behavior (2 known examples)

XMLWordPrintable

    • Quality / Stability / Reliability
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Didn't get fixed in the issue: https://issues.redhat.com/browse/ACM-22417

      For this issue, these YAML samples could not be manipulated to get the callouts to work properly. I was able to manipulate some of the others by moving the callouts around.

      Gemini offered some guidance, but it was not relevant. Please look in to our code/tools and see what in the parser may be causing this? The CCS tools channel may provide a contact.

      See PR and research from Gemini:
      This didn't apply, but I did test it: https://github.com/stolostron/rhacm-docs/pull/8162

      The reason you are seeing double 1 callouts in your AsciiDoc output is because the callout syntax requires the number to appear twice for each annotation. The first instance, <1>, is placed inline within the source code block to mark the specific line. The second instance, also <1>, is placed outside the code block to define the explanatory text for that callout.

      This double-numbering system is how AsciiDoc correctly associates the annotation text with the exact line in the code block. It's a fundamental part of the syntax, ensuring that the callout number is not part of the copied code when a user selects the text.

      How AsciiDoc Callouts Work

       

      • Inline Callout: The <n> where n is the callout number, is placed at the end of the line you want to annotate inside the code block.
      • Annotation: A corresponding <n> is placed on a new line outside the code block, followed by the explanatory text.

      In your provided input, the line from: local-cluster <1> correctly marks the line to be annotated. However, the first explanatory line is also <1>, causing the output to render the first callout as 1 twice. This is an error in the provided input. To fix this, you should have the explanatory text start with a different number, such as <1> for the first explanation, <2> for the second, and so on, which you already have for <2>, <3>, and <4>.
       (gave corrected input, but the only difference was a hidden space){{}}
      By placing the callout numbers outside the code block, you are correctly instructing AsciiDoc to associate each explanation with its corresponding line.

              rh-ee-ofischer Oliver Fischer
              bswope@redhat.com Brandi Swope
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: