diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-04-21 01:01:13 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2018-04-22 23:40:05 -0600 |
| commit | b48709271c2c0f7a7bb7b5a999f12ae6c4f46251 (patch) | |
| tree | 8a007cd2b7b8dc762088dda8b156b6769f86624e /features | |
| parent | 6ceda95d640d677ec15fb4ecd02451b7671b3259 (diff) | |
resolves #2298 add numbering for parts
- number parts using roman numerals if the partnums attribute is set
- move method to convert integer to roman to Helpers module
- assign the value "Part" to the part-refsig attribute by default
- define the part-label attribute in the attributes-en.adoc data file
- add support for partnums and sectnums=all to create_section helper in extensions
- add partnums and sectnums=all scenarios to test for create_section helper
Diffstat (limited to 'features')
| -rw-r--r-- | features/xref.feature | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/features/xref.feature b/features/xref.feature index 9a5974ee..bd4215a6 100644 --- a/features/xref.feature +++ b/features/xref.feature @@ -263,6 +263,147 @@ Feature: Cross References |to find a complete list of features. """ + Scenario: Create a full cross reference to a numbered part + Given the AsciiDoc source + """ + :doctype: book + :sectnums: + :partnums: + :xrefstyle: full + + [preface] + = Preface + + See <<p1>> for an introduction to the language. + + [#p1] + = Language + + == Syntax + + This chapter covers the syntax. + """ + When it is converted to html + Then the result should contain the HTML structure + """ + |See + a<> href='#p1' Part I, “Language” + |for an introduction to the language. + """ + + Scenario: Create a short cross reference to a numbered part + Given the AsciiDoc source + """ + :doctype: book + :sectnums: + :partnums: + :xrefstyle: short + + [preface] + = Preface + + See <<p1>> for an introduction to the language. + + [#p1] + = Language + + == Syntax + + This chapter covers the syntax. + """ + When it is converted to html + Then the result should contain the HTML structure + """ + |See + a<> href='#p1' Part I + |for an introduction to the language. + """ + + Scenario: Create a basic cross reference to a numbered part + Given the AsciiDoc source + """ + :doctype: book + :sectnums: + :partnums: + :xrefstyle: basic + + [preface] + = Preface + + See <<p1>> for an introduction to the language. + + [#p1] + = Language + + == Syntax + + This chapter covers the syntax. + """ + When it is converted to html + Then the result should contain the HTML structure + """ + |See + a<> href='#p1' Language + |for an introduction to the language. + """ + + Scenario: Create a basic cross reference to an unnumbered part + Given the AsciiDoc source + """ + :doctype: book + :sectnums: + :xrefstyle: full + + [preface] + = Preface + + See <<p1>> for an introduction to the language. + + [#p1] + = Language + + == Syntax + + This chapter covers the syntax. + """ + When it is converted to html + Then the result should contain the HTML structure + """ + |See + a<> href='#p1' Language + |for an introduction to the language. + """ + + @wip + Scenario: Create a cross reference to a part using a custom chapter reference signifier + Given the AsciiDoc source + """ + :doctype: book + :sectnums: + :partnums: + :xrefstyle: full + :part-refsig: P + + [preface] + = Preface + + See <<p1>> for an introduction to the language. + + [#p1] + = Language + + == Syntax + + This chapter covers the syntax. + """ + When it is converted to html + Then the result should contain the HTML structure + """ + |See + a<> href='#p1' P I, “Language” + |for an introduction to the language. + """ + Scenario: Create a full cross reference to a numbered appendix Given the AsciiDoc source """ |
