summaryrefslogtreecommitdiff
path: root/features/xref.feature
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2014-07-15 01:57:27 -0600
committerDan Allen <dan.j.allen@gmail.com>2014-07-15 01:57:27 -0600
commitbab16feadd8c35b462b7b5430d0f2ab255b17d71 (patch)
tree4a418b9eb89f27196a06406804e13a021f50b7f7 /features/xref.feature
parent2088cc3508d0fd365cd0856d8fc0bfae0ab1b915 (diff)
resolves #589 basic support for resolving xref from reftext
Diffstat (limited to 'features/xref.feature')
-rw-r--r--features/xref.feature82
1 files changed, 81 insertions, 1 deletions
diff --git a/features/xref.feature b/features/xref.feature
index d9c29025..c2ec2592 100644
--- a/features/xref.feature
+++ b/features/xref.feature
@@ -19,7 +19,7 @@ Feature: Cross References
When it is converted to html
Then the result should match the HTML structure
"""
- table.tableblock.frame-all.grid-all style='width: 100%;'
+ table.tableblock.frame-all.grid-all.spread
colgroup
col style='width: 100%;'
tbody
@@ -34,3 +34,83 @@ Feature: Cross References
.sectionbody
.paragraph: p Instructions go here.
"""
+
+
+ Scenario: Create a cross reference using the target section title
+ Given the AsciiDoc source
+ """
+ == Section One
+
+ content
+
+ == Section Two
+
+ refer to <<Section One>>
+ """
+ When it is converted to html
+ Then the result should match the HTML structure
+ """
+ .sect1
+ h2#_section_one Section One
+ .sectionbody: .paragraph: p content
+ .sect1
+ h2#_section_two Section Two
+ .sectionbody: .paragraph: p
+ 'refer to
+ a href='#_section_one' Section One
+ """
+
+
+ Scenario: Create a cross reference using the target reftext
+ Given the AsciiDoc source
+ """
+ [reftext="the first section"]
+ == Section One
+
+ content
+
+ == Section Two
+
+ refer to <<the first section>>
+ """
+ When it is converted to html
+ Then the result should match the HTML structure
+ """
+ .sect1
+ h2#_section_one Section One
+ .sectionbody: .paragraph: p content
+ .sect1
+ h2#_section_two Section Two
+ .sectionbody: .paragraph: p
+ 'refer to
+ a href='#_section_one' the first section
+ """
+
+
+ Scenario: Create a cross reference using the formatted target title
+ Given the AsciiDoc source
+ """
+ == Section *One*
+
+ content
+
+ == Section Two
+
+ refer to <<Section *One*>>
+ """
+ When it is converted to html
+ Then the result should match the HTML structure
+ """
+ .sect1
+ h2#_section_strong_one_strong
+ 'Section
+ strong One
+ .sectionbody: .paragraph: p content
+ .sect1
+ h2#_section_two Section Two
+ .sectionbody: .paragraph: p
+ 'refer to
+ a href='#_section_strong_one_strong'
+ 'Section
+ strong One
+ """