You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
477 B

from panflute import Div,Span
from util import *
from typing import List
class Command:
pass
class InlineCommand(Span, Command):
def replaceSelf(self, content: List[Element]) -> Span:
if "c" in r.attributes:
del r.attributes["c"]
return replaceEl(self, Span(*content))
pass
class MultilineCommand(Div, Command):
def replaceSelf(self, content: List[Element]) -> Div:
if "c" in r.attributes:
del r.attributes["c"]
return replaceEl(self, Div(*content))
pass