Show More
@@ -243,7 +243,10 b' def formatblock(block, width):' | |||||
243 | indent = ' ' * block['indent'] |
|
243 | indent = ' ' * block['indent'] | |
244 | if block['type'] == 'margin': |
|
244 | if block['type'] == 'margin': | |
245 | return '' |
|
245 | return '' | |
246 |
elif block['type'] |
|
246 | elif block['type'] == 'literal': | |
|
247 | indent += ' ' | |||
|
248 | return indent + ('\n' + indent).join(block['lines']) | |||
|
249 | elif block['type'] == 'section': | |||
247 | return indent + ('\n' + indent).join(block['lines']) |
|
250 | return indent + ('\n' + indent).join(block['lines']) | |
248 | elif block['type'] == 'definition': |
|
251 | elif block['type'] == 'definition': | |
249 | term = indent + block['lines'][0] |
|
252 | term = indent + block['lines'][0] |
@@ -106,7 +106,8 b' We can have indented lists:' | |||||
106 |
|
106 | |||
107 | :: |
|
107 | :: | |
108 |
|
108 | |||
109 |
Literal block with no indentation |
|
109 | Literal block with no indentation (apart from | |
|
110 | the two spaces added to all literal blocks). | |||
110 | """ |
|
111 | """ | |
111 |
|
112 | |||
112 | debugformat('lists', lists, 60) |
|
113 | debugformat('lists', lists, 60) |
@@ -123,7 +123,8 b' We can have indented lists:' | |||||
123 |
|
123 | |||
124 | (The above is not a list item since we are in the literal block.) |
|
124 | (The above is not a list item since we are in the literal block.) | |
125 |
|
125 | |||
126 |
Literal block with no indentation |
|
126 | Literal block with no indentation (apart from | |
|
127 | the two spaces added to all literal blocks). | |||
127 | ---------------------------------------------------------------------- |
|
128 | ---------------------------------------------------------------------- | |
128 |
|
129 | |||
129 | lists formatted to fit within 30 characters: |
|
130 | lists formatted to fit within 30 characters: | |
@@ -150,7 +151,8 b' We can have indented lists:' | |||||
150 |
|
151 | |||
151 | (The above is not a list item since we are in the literal block.) |
|
152 | (The above is not a list item since we are in the literal block.) | |
152 |
|
153 | |||
153 |
Literal block with no indentation |
|
154 | Literal block with no indentation (apart from | |
|
155 | the two spaces added to all literal blocks). | |||
154 | ---------------------------------------------------------------------- |
|
156 | ---------------------------------------------------------------------- | |
155 |
|
157 | |||
156 | options formatted to fit within 60 characters: |
|
158 | options formatted to fit within 60 characters: |
General Comments 0
You need to be logged in to leave comments.
Login now