Skip to content

Commit

Permalink
make index terms be elements not attributes, to preserve formatting: m…
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Dec 16, 2020
1 parent 07ce52d commit 85ae49e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 3 additions & 3 deletions grammars/basicdoc.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ hr = element hr { empty }
pagebreak = element pagebreak { empty }

index = element index {
attribute primary { text },
attribute secondary { text }?,
attribute tertiary { text }?
element primary { PureTextElement+ },
element secondary { PureTextElement+ }?,
element tertiary { PureTextElement+ }?
}

index-xref = element index-xref {
Expand Down
18 changes: 15 additions & 3 deletions grammars/basicdoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,24 @@
</define>
<define name="index">
<element name="index">
<attribute name="primary"/>
<element name="primary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
<optional>
<attribute name="secondary"/>
<element name="secondary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
</optional>
<optional>
<attribute name="tertiary"/>
<element name="tertiary">
<oneOrMore>
<ref name="PureTextElement"/>
</oneOrMore>
</element>
</optional>
</element>
</define>
Expand Down

0 comments on commit 85ae49e

Please sign in to comment.