from readline import set_completion_display_matches_hook from pelican import signals import re def split_sections(generator, content): """ Split the markdown content of an article or page into sections everytime it encounter a comment of the form and put those in a new `sections` attribute as a dictonnary. The `content` attribute is left intact. """ html_content = content.content content.sections = {} pattern = re.compile(r").)*)\]-->((?:(?!