From dita-tools
Removes hard line breaks from AsciiDoc files using Ruby script for DITA compatibility. Use when fixing line breaks, removing forced breaks, or preparing files for DITA conversion.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin dita-toolsThis skill is limited to using the following tools:
Remove hard line breaks from AsciiDoc files for DITA compatibility.
Adds missing [role="_abstract"] attributes to AsciiDoc files via Ruby script for DITA short description support. Use when marking short descriptions or preparing files for DITA conversion.
Reviews AsciiDoc (.adoc) files for Red Hat modular documentation compliance: module types (concept, procedure, reference), assembly structure, anchor IDs with _{context}, context variables, and include directives.
Extracts Jobs-To-Be-Done records from modular AsciiDoc documentation repos. Analyzes assemblies, includes, conditionals via reduction, source mapping, and chunked analysis for user goals.
Share bugs, ideas, or general feedback.
Remove hard line breaks from AsciiDoc files for DITA compatibility.
This skill uses the line_break.rb Ruby script to find and remove hard line breaks that are not supported in DITA. Hard line breaks in AsciiDoc can be created using:
+ at the end of a line ( +):hardbreaks-option: document attribute%hardbreaks option on blocksoptions=hardbreaks attributeBefore:
This is the first line +
and this continues on a new line.
After:
This is the first line and this continues on a new line.
Before:
:hardbreaks-option:
This text has
forced line breaks
everywhere.
After:
This text has forced line breaks everywhere.
Before:
[%hardbreaks]
First line
Second line
Third line
After:
First line
Second line
Third line
Hard line breaks cannot be mapped to DITA output. The AsciiDocDITA Vale rule LineBreak.yml warns:
Hard line breaks are not supported in DITA.
When the user asks to fix line breaks:
.adoc files in the target locationruby scripts/line_break.rb <file>
To preview changes without modifying files:
ruby scripts/line_break.rb <file> --dry-run
ruby scripts/line_break.rb <file> -o <output.adoc>
find <folder> -name "*.adoc" -exec ruby scripts/line_break.rb {} \;
+ line continuations" + at end of line, the following line is joined with a space:hardbreaks-option: attribute line is removed entirely%hardbreaks option is removed from block attribute lists<file>: Removed N hard line break(s)
Or:
<file>: No hard line breaks found
The Ruby script is located at: scripts/line_break.rb
This skill addresses the warning from: .vale/styles/AsciiDocDITA/LineBreak.yml