##// END OF EJS Templates
minirst: respect escaping in definition list key...
marmoute -
r47114:aaff3bc7 default
parent child Browse files
Show More
@@ -158,7 +158,7 b' def findliteralblocks(blocks):'
158 _optionre = re.compile(
158 _optionre = re.compile(
159 br'^(-([a-zA-Z0-9]), )?(--[a-z0-9-]+)' br'((.*) +)(.*)$'
159 br'^(-([a-zA-Z0-9]), )?(--[a-z0-9-]+)' br'((.*) +)(.*)$'
160 )
160 )
161 _fieldre = re.compile(br':(?![: ])([^:]*)(?<! ):[ ]+(.*)')
161 _fieldre = re.compile(br':(?![: ])((?:\:|[^:])*)(?<! ):[ ]+(.*)')
162 _definitionre = re.compile(br'[^ ]')
162 _definitionre = re.compile(br'[^ ]')
163 _tablere = re.compile(br'(=+\s+)*=+')
163 _tablere = re.compile(br'(=+\s+)*=+')
164
164
@@ -229,7 +229,7 b' def updatefieldlists(blocks):'
229 m = _fieldre.match(blocks[j][b'lines'][0])
229 m = _fieldre.match(blocks[j][b'lines'][0])
230 key, rest = m.groups()
230 key, rest = m.groups()
231 blocks[j][b'lines'][0] = rest
231 blocks[j][b'lines'][0] = rest
232 blocks[j][b'key'] = key
232 blocks[j][b'key'] = key.replace(br'\:', b':')
233 j += 1
233 j += 1
234
234
235 i = j + 1
235 i = j + 1
@@ -159,6 +159,8 b' fields = b"""'
159 :a: First item.
159 :a: First item.
160 :ab: Second item. Indentation and wrapping
160 :ab: Second item. Indentation and wrapping
161 is handled automatically.
161 is handled automatically.
162 :c\:d: a key with colon
163 :efg\:\:hh: a key with many colon
162
164
163 Next list:
165 Next list:
164
166
@@ -439,6 +439,8 b' 60 column format:'
439 a First item.
439 a First item.
440 ab Second item. Indentation and wrapping is
440 ab Second item. Indentation and wrapping is
441 handled automatically.
441 handled automatically.
442 c:d a key with colon
443 efg::hh a key with many colon
442
444
443 Next list:
445 Next list:
444
446
@@ -456,6 +458,9 b' ab Second item.'
456 wrapping is
458 wrapping is
457 handled
459 handled
458 automatically.
460 automatically.
461 c:d a key with colon
462 efg::hh a key with many
463 colon
459
464
460 Next list:
465 Next list:
461
466
@@ -476,6 +481,10 b' html format:'
476 <dd>First item.
481 <dd>First item.
477 <dt>ab
482 <dt>ab
478 <dd>Second item. Indentation and wrapping is handled automatically.
483 <dd>Second item. Indentation and wrapping is handled automatically.
484 <dt>c:d
485 <dd>a key with colon
486 <dt>efg::hh
487 <dd>a key with many colon
479 </dl>
488 </dl>
480 <p>
489 <p>
481 Next list:
490 Next list:
General Comments 0
You need to be logged in to leave comments. Login now