'
# header
for document in documents: # pylint: disable=not-an-iterable
- yield '
'
+ yield '
'
yield '
'
for document in documents: # pylint: disable=not-an-iterable
link = '{p}'.format(p=document.prefix)
- yield ('
{link}
'.format(link=link))
+ yield ('
{link}
'.format(link=link))
yield '
'
# data
for index, row in enumerate(tree.get_traceability()):
@@ -208,8 +206,8 @@ def _lines_index(filenames, charset='UTF-8', tree=None):
if item is None:
link = ''
else:
- link = _format_html_item_link(item)
- yield '
{}
'.format(link)
+ link = _format_html_item_link_index_table(item)
+ yield '
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
@@ -40,26 +40,31 @@
eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
@@ -41,12 +41,14 @@
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Links: SYS001, SYS002
+
1.4 REQ003
Unicode: -40° ±1%
external/text.txt (line 3)
Links: REQ001
+
1.5 REQ006
Hello, world!
@@ -54,11 +56,14 @@
external/text2.txt
Links: REQ001
+
1.6 REQ004
Hello, world!
+
2.1 Plantuml REQ002
Hello, world!
+
2.1 REQ2-001
Hello, world!
Test Math Expressions in Latex Style:
@@ -67,6 +72,7 @@
Multiline:
Links: REQ001
+
diff --git a/doorstop/core/tests/files/published2.md b/doorstop/core/tests/files/published2.md
index 373d338ed..3d2115900 100644
--- a/doorstop/core/tests/files/published2.md
+++ b/doorstop/core/tests/files/published2.md
@@ -11,6 +11,7 @@ deserunt mollit anim id est laborum.
*Links: SYS001, SYS002*
+***
## 1.4 REQ003 {#REQ003 }
Unicode: -40° ±1%
@@ -19,6 +20,7 @@ Unicode: -40° ±1%
*Links: REQ001*
+***
## 1.5 REQ006 {#REQ006 }
Hello, world!
@@ -28,10 +30,12 @@ Hello, world!
*Links: REQ001*
+***
## 1.6 REQ004 {#REQ004 }
Hello, world!
+***
## 2.1 Plantuml REQ002 {#REQ002 }
Hello, world!
@@ -54,6 +58,7 @@ System --> (Integrity)
@enduml
```
+***
## 2.1 REQ2-001 {#REQ2-001 }
Hello, world!
@@ -66,3 +71,4 @@ Multiline: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
*Links: REQ001*
+***
diff --git a/doorstop/core/tests/test_publisher.py b/doorstop/core/tests/test_publisher.py
index ca2179f16..d8386b48a 100644
--- a/doorstop/core/tests/test_publisher.py
+++ b/doorstop/core/tests/test_publisher.py
@@ -244,7 +244,7 @@ def test_lines_text_item_heading_no_heading_levels(self):
def test_single_line_heading_to_markdown(self):
"""Verify a single line heading is published as a heading with an attribute equal to the item id"""
- expected = "## 1.1 Heading {#req3 }\n\n"
+ expected = "## 1.1 Heading {#req3 }\n\n***\n"
lines = publisher.publish_lines(self.item, '.md', linkify=True)
# Act
text = ''.join(line + '\n' for line in lines)
@@ -262,7 +262,9 @@ def test_multi_line_heading_to_markdown(self):
"normative: false"
),
)
- expected = "## 1.1 Heading {#req3 }\nThis section describes publishing.\n\n"
+ expected = (
+ "## 1.1 Heading {#req3 }\nThis section describes publishing.\n\n***\n"
+ )
lines = publisher.publish_lines(item, '.md', linkify=True)
# Act
text = ''.join(line + '\n' for line in lines)
@@ -281,7 +283,7 @@ def test_multi_line_heading_to_markdown_no_heading_levels(self):
"normative: false"
),
)
- expected = "## Heading {#req3 }\nThis section describes publishing.\n\n"
+ expected = "## Heading {#req3 }\nThis section describes publishing.\n\n***\n"
lines = publisher.publish_lines(item, '.md', linkify=True)
# Act
text = ''.join(line + '\n' for line in lines)
@@ -348,7 +350,7 @@ def test_lines_markdown_item_references(self):
def test_lines_markdown_item_heading(self):
"""Verify Markdown can be published from an item (heading)."""
- expected = "## 1.1 Heading {#req3 }\n\n"
+ expected = "## 1.1 Heading {#req3 }\n\n***\n"
# Act
lines = publisher.publish_lines(self.item, '.md', linkify=True)
text = ''.join(line + '\n' for line in lines)
@@ -358,7 +360,7 @@ def test_lines_markdown_item_heading(self):
@patch('doorstop.settings.PUBLISH_HEADING_LEVELS', False)
def test_lines_markdown_item_heading_no_heading_levels(self):
"""Verify an item heading level can be ommitted."""
- expected = "## Heading {#req3 }\n\n"
+ expected = "## Heading {#req3 }\n\n***\n"
# Act
lines = publisher.publish_lines(self.item, '.md', linkify=True)
text = ''.join(line + '\n' for line in lines)
@@ -372,7 +374,7 @@ def test_lines_markdown_item_normative(self):
"## 1.2 req4 {#req4 }" + '\n\n'
"This shall..." + '\n\n'
"> `Doorstop.sublime-project`" + '\n\n'
- "*Links: sys4*" + '\n\n'
+ "*Links: sys4*" + '\n\n***\n'
)
# Act
lines = publisher.publish_lines(self.item3, '.md', linkify=False)
@@ -387,7 +389,7 @@ def test_lines_markdown_item_with_child_links(self):
lines = publisher.publish_lines(self.item2, '.md')
text = ''.join(line + '\n' for line in lines)
# Assert
- self.assertIn("Child links: tst1", text)
+ self.assertIn("Children: tst1", text)
@patch('doorstop.settings.PUBLISH_CHILD_LINKS', False)
def test_lines_markdown_item_without_child_links(self):
@@ -406,7 +408,7 @@ def test_lines_markdown_item_without_body_levels(self):
"## req4 {#req4 }" + '\n\n'
"This shall..." + '\n\n'
"> `Doorstop.sublime-project`" + '\n\n'
- "*Links: sys4*" + '\n\n'
+ "*Links: sys4*" + '\n\n***\n'
)
# Act
lines = publisher.publish_lines(self.item3, '.md', linkify=False)
@@ -430,9 +432,7 @@ def test_lines_markdown_item_no_references_check(self):
def test_lines_html_item(self):
"""Verify HTML can be published from an item."""
- expected = (
- '
1.1 Heading
\n\n'
- )
+ expected = '
1.1 Heading
\n\n\n'
# Act
lines = publisher.publish_lines(self.item, '.html')
text = ''.join(line + '\n' for line in lines)
@@ -442,7 +442,9 @@ def test_lines_html_item(self):
@patch('doorstop.settings.PUBLISH_HEADING_LEVELS', False)
def test_lines_html_item_no_heading_levels(self):
"""Verify an item heading level can be ommitted."""
- expected = '
Heading
\n\n'
+ expected = (
+ '
Heading
\n\n\n'
+ )
# Act
lines = publisher.publish_lines(self.item, '.html')
text = ''.join(line + '\n' for line in lines)
@@ -451,9 +453,7 @@ def test_lines_html_item_no_heading_levels(self):
def test_lines_html_item_linkify(self):
"""Verify HTML (hyper) can be published from an item."""
- expected = (
- '
1.1 Heading
\n\n'
- )
+ expected = '
1.1 Heading
\n\n\n'
# Act
lines = publisher.publish_lines(self.item, '.html', linkify=True)
text = ''.join(line + '\n' for line in lines)
@@ -467,7 +467,7 @@ def test_lines_html_item_with_child_links(self):
lines = publisher.publish_lines(self.item2, '.html')
text = ''.join(line + '\n' for line in lines)
# Assert
- self.assertIn("Child links: tst1", text)
+ self.assertIn("Children: tst1", text)
@patch('doorstop.settings.PUBLISH_CHILD_LINKS', False)
def test_lines_html_item_without_child_links(self):
@@ -476,7 +476,7 @@ def test_lines_html_item_without_child_links(self):
lines = publisher.publish_lines(self.item2, '.html')
text = ''.join(line + '\n' for line in lines)
# Assert
- self.assertNotIn("Child links", text)
+ self.assertNotIn("Children", text)
@patch('doorstop.settings.PUBLISH_CHILD_LINKS', True)
def test_lines_html_item_with_child_links_linkify(self):
@@ -485,7 +485,7 @@ def test_lines_html_item_with_child_links_linkify(self):
lines = publisher.publish_lines(self.item2, '.html', linkify=True)
text = ''.join(line + '\n' for line in lines)
# Assert
- self.assertIn("Child links:", text)
+ self.assertIn("Children:", text)
self.assertIn("tst.html#tst1", text)
def test_lines_unknown(self):
@@ -505,7 +505,7 @@ def setUp(self):
def test_toc_no_links_or_heading_levels(self):
"""Verify the table of contents is generated with heading levels"""
- expected = '''### Table of Contents
+ expected = '''**Contents**
* 1.2.3 REQ001
* 1.4 REQ003
@@ -520,7 +520,7 @@ def test_toc_no_links_or_heading_levels(self):
@patch('doorstop.settings.PUBLISH_HEADING_LEVELS', False)
def test_toc_no_links(self):
"""Verify the table of contents is generated without heading levels"""
- expected = '''### Table of Contents
+ expected = '''**Contents**
* REQ001
* REQ003
@@ -534,7 +534,7 @@ def test_toc_no_links(self):
def test_toc(self):
"""Verify the table of contents is generated with an ID for the heading"""
- expected = '''### Table of Contents
+ expected = '''**Contents**
* [1.2.3 REQ001](#REQ001)
* [1.4 REQ003](#REQ003)
diff --git a/doorstop/views/sidebar.tpl b/doorstop/views/sidebar.tpl
index f4193c140..26b13f012 100644
--- a/doorstop/views/sidebar.tpl
+++ b/doorstop/views/sidebar.tpl
@@ -1,12 +1,12 @@
% rebase('base.tpl', title='Doorstop', stylesheet='sidebar.css')