Show More
@@ -413,24 +413,12 b' def prunecomments(blocks):' | |||
|
413 | 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 | 416 | def findadmonitions(blocks, admonitions=None): |
|
429 | 417 | """ |
|
430 | 418 | Makes the type of the block an admonition block if |
|
431 | 419 | the first line is an admonition directive |
|
432 | 420 | """ |
|
433 | admonitions = admonitions or _admonitions | |
|
421 | admonitions = admonitions or _admonitiontitles.keys() | |
|
434 | 422 | |
|
435 | 423 | admonitionre = re.compile(br'\.\. (%s)::' % '|'.join(sorted(admonitions)), |
|
436 | 424 | flags=re.IGNORECASE) |
General Comments 0
You need to be logged in to leave comments.
Login now