Ticking a section off crosses out the section
It struck the heading and left everything underneath looking untouched, which is the opposite of what somebody ticking "this section is done" means. The strike now covers every block under that heading, down to the next heading of the same or higher rank - so a top-level section takes its sub-sections with it. That needed the rank, and the HTML importer was throwing it away: h2, h3 and h4 all arrived as a flat 'heading', so a parent heading had no children to cross out. It was the visible half of a real loss - a converted article kept its words and lost its shape. Headings now carry their level and render at it, and a guide written before this reads as flat, exactly as it did. Code blocks, tables and images inside a finished section fade but are not struck. A line through a command makes it unreadable, and re-reading the command is usually the reason to look back at a step already done. The five imported guides were re-imported so they carry their structure.
This commit is contained in:
@@ -244,7 +244,12 @@ class _Builder:
|
||||
if tag in ('h2', 'h3', 'h4', 'h5'):
|
||||
text = _inline(node)
|
||||
if text:
|
||||
self._add({'type': 'heading', 'text': text})
|
||||
# The LEVEL travels with it. Without it every heading is a
|
||||
# sibling, and a reader who ticks a section off crosses out its
|
||||
# title and nothing underneath - the sub-headings that belong to
|
||||
# it look untouched, because nothing recorded that they belong.
|
||||
self._add({'type': 'heading', 'level': int(tag[1]),
|
||||
'text': text})
|
||||
return
|
||||
|
||||
if tag == 'p':
|
||||
|
||||
Reference in New Issue
Block a user