##// END OF EJS Templates
minirst: remove redundant _admonitions set...
Gregory Szorc -
r31714:bbf7a29d default
parent child Browse files
Show More
@@ -413,24 +413,12 b' def prunecomments(blocks):'
413 return blocks
413 return blocks
414
414
415
415
416 _admonitions = set([
417 'attention',
418 'caution',
419 'danger',
420 'error',
421 'hint',
422 'important',
423 'note',
424 'tip',
425 'warning',
426 ])
427
428 def findadmonitions(blocks, admonitions=None):
416 def findadmonitions(blocks, admonitions=None):
429 """
417 """
430 Makes the type of the block an admonition block if
418 Makes the type of the block an admonition block if
431 the first line is an admonition directive
419 the first line is an admonition directive
432 """
420 """
433 admonitions = admonitions or _admonitions
421 admonitions = admonitions or _admonitiontitles.keys()
434
422
435 admonitionre = re.compile(br'\.\. (%s)::' % '|'.join(sorted(admonitions)),
423 admonitionre = re.compile(br'\.\. (%s)::' % '|'.join(sorted(admonitions)),
436 flags=re.IGNORECASE)
424 flags=re.IGNORECASE)
General Comments 0
You need to be logged in to leave comments. Login now