From bab16feadd8c35b462b7b5430d0f2ab255b17d71 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Tue, 15 Jul 2014 01:57:27 -0600 Subject: resolves #589 basic support for resolving xref from reftext --- features/xref.feature | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) (limited to 'features') 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 <
> + """ + 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 <> + """ + 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 <
> + """ + 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 + """ -- cgit v1.2.3