Class AsciiDocPage

java.lang.Object
ch.so.agi.hop.doclint.doc.AsciiDocPage

public final class AsciiDocPage extends Object
Minimal AsciiDoc reader for the doclint contract: document attributes and level-2 sections.

This is intentionally not a full AsciiDoc parser. The linter only needs the contract attributes and whether a required section has readable content.

  • Method Details

    • read

      public static AsciiDocPage read(Path path) throws IOException
      Throws:
      IOException
    • parse

      public static AsciiDocPage parse(String text)
    • attribute

      public Optional<String> attribute(String name)
    • hasSection

      public boolean hasSection(String name)
    • hasAnchor

      public boolean hasAnchor(String name)
      True when the page declares the given explicit anchor ([[id]] or [#id]).
    • hasSectionContent

      public boolean hasSectionContent(String name)
      True when the section exists and contains at least one readable line.