Skip to content

Tags backend raises error "node_text_content(document) should be unreachable" #102

@james-ball-qualcomm

Description

@james-ball-qualcomm

Somehow in RISC-V-Certification-Steering-Committee/riscv-isa-manual#11 the tags added to the ISA manual are causing node_text_context to be called with a "document" node name and Tim's tags.rb isn't expecting this. So, it raises an exception. I'm going to change it to a warning for now to make progress but Tim, can you help?

  # Return the text content of a node. Adapted from `text-converter.rb`
  # in the docs: https://docs.asciidoctor.org/asciidoctor/latest/convert/custom/
  #
  # node: AbstractNode
  # returns: String
  def node_text_content(node)
    content_or_nil = case node.node_name
    when "document"
      warn "node_text_content(document) should be unreachable"
    when "section"
      "\n" + [node.title, node.content].join("\n").rstrip()
    when "paragraph"
      "\n" + normalize_space(node.content)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions