From 85ae49e8fb1f454b8ad155d6d3455bbf859f86a1 Mon Sep 17 00:00:00 2001 From: Nick Nicholas Date: Wed, 16 Dec 2020 22:21:54 +1100 Subject: [PATCH] make index terms be elements not attributes, to preserve formatting: https://github.com/metanorma/metanorma-bipm/issues/67 --- grammars/basicdoc.rnc | 6 +++--- grammars/basicdoc.rng | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/grammars/basicdoc.rnc b/grammars/basicdoc.rnc index b6bf70b..b03b1e4 100644 --- a/grammars/basicdoc.rnc +++ b/grammars/basicdoc.rnc @@ -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 { diff --git a/grammars/basicdoc.rng b/grammars/basicdoc.rng index 471a59e..dcb4c9a 100644 --- a/grammars/basicdoc.rng +++ b/grammars/basicdoc.rng @@ -729,12 +729,24 @@ - + + + + + - + + + + + - + + + + +