def action()

in migration/src/markup/lists.py [0:0]


    def action(self, tokens: ParseResults) -> str:
        result = super().action(tokens)
        first_line = (result.splitlines() or [""])[0].strip()

        # Text with dashed below it turns into a heading. To prevent this
        # add a line break before an empty list.
        if first_line == "-":
            return "\n" + result
        else:
            return result