HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: //usr/lib/x86_64-linux-gnu/gobject-introspection/giscanner/mdextensions.py
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor


class RemoveOuterP(Treeprocessor):
    def run(self, root):
        if len(root) == 1 and root[0].tag == "p":
            root[0].tag = "span"


class InlineMarkdown(Extension):
    def extendMarkdown(self, md, md_globals):
        md.treeprocessors.add("remove_outer_p", RemoveOuterP(md), "_end")