From ebb09c615e9c143260a8f6010c42f7be890b9587 Mon Sep 17 00:00:00 2001 From: Keith Fahlgren Date: Wed, 12 Aug 2009 02:54:56 +0000 Subject: [PATCH] Fix a bug when using index.on.type: an 'index symbols' section was created even if that typed index didn't include any symbols (they were in the other types). --- xsl/epub/bin/spec/epub_regressions_spec.rb | 9 +++ .../spec/files/index.with.symbol.and.type.xml | 30 +++++++++ xsl/epub/bin/spec/files/test_cust.xsl | 1 + xsl/html/autoidx.xsl | 63 +++++++++++++------ 4 files changed, 85 insertions(+), 18 deletions(-) create mode 100644 xsl/epub/bin/spec/files/index.with.symbol.and.type.xml diff --git a/xsl/epub/bin/spec/epub_regressions_spec.rb b/xsl/epub/bin/spec/epub_regressions_spec.rb index d12d128cf..0d0172f95 100755 --- a/xsl/epub/bin/spec/epub_regressions_spec.rb +++ b/xsl/epub/bin/spec/epub_regressions_spec.rb @@ -167,6 +167,15 @@ describe DocBook::Epub do container_lines.to_s.should =~ / true) end diff --git a/xsl/epub/bin/spec/files/index.with.symbol.and.type.xml b/xsl/epub/bin/spec/files/index.with.symbol.and.type.xml new file mode 100644 index 000000000..2812620f4 --- /dev/null +++ b/xsl/epub/bin/spec/files/index.with.symbol.and.type.xml @@ -0,0 +1,30 @@ + + + + First Book + + Chapter + Some test data +First Book + + + Chapter + Some test data +λ (lambda operator) + + + Part Title + + Chapter + Some test data +Third Book + + + A Index + + + B Index + + + + diff --git a/xsl/epub/bin/spec/files/test_cust.xsl b/xsl/epub/bin/spec/files/test_cust.xsl index 6e66a58b7..bf84017e4 100644 --- a/xsl/epub/bin/spec/files/test_cust.xsl +++ b/xsl/epub/bin/spec/files/test_cust.xsl @@ -4,5 +4,6 @@ version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + diff --git a/xsl/html/autoidx.xsl b/xsl/html/autoidx.xsl index 8137bc831..cd068e4d6 100644 --- a/xsl/html/autoidx.xsl +++ b/xsl/html/autoidx.xsl @@ -126,24 +126,51 @@ substring(&primary;, 1, 1)))]"/>
-
-

- - - -

-
- - - - - - - -
-
+ + +
+

+ + + +

+
+ + + + + + + +
+
+
+ + + + +
+

+ + + +

+
+ + + + + + + +
+
+
+