|
@ -7,7 +7,7 @@ from panflute import stringify |
|
|
from typing import Union, Callable |
|
|
from typing import Union, Callable |
|
|
|
|
|
|
|
|
from .whitespace import NBSP |
|
|
from .whitespace import NBSP |
|
|
from .elements import FQuoted, Slanted, FLink |
|
|
from .elements import FQuoted, Slanted, FLink, FileLink |
|
|
from .context import Group, InlineGroup, BlockGroup, Context |
|
|
from .context import Group, InlineGroup, BlockGroup, Context |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,6 +129,7 @@ class OutputGenerator: |
|
|
NBSP: self.generate_NBSP, |
|
|
NBSP: self.generate_NBSP, |
|
|
FQuoted: self.generate_FQuoted, |
|
|
FQuoted: self.generate_FQuoted, |
|
|
FLink: self.generate_FLink, |
|
|
FLink: self.generate_FLink, |
|
|
|
|
|
FileLink: self.generate_FileLink, |
|
|
InlineGroup: self.generate_InlineGroup |
|
|
InlineGroup: self.generate_InlineGroup |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -274,9 +275,9 @@ class OutputGenerator: |
|
|
self.write(self.end_tag(tag)) |
|
|
self.write(self.end_tag(tag)) |
|
|
|
|
|
|
|
|
def generate_raw_block_tag(self, tag: str, text: str, attributes: dict[str,str]={}): |
|
|
def generate_raw_block_tag(self, tag: str, text: str, attributes: dict[str,str]={}): |
|
|
self.writeln(self.start_tag(tag, attributes)) |
|
|
self.writeraw(self.start_tag(tag, attributes)) |
|
|
self.writeraw(text) |
|
|
self.writeraw(text) |
|
|
self.writeln(self.end_tag(tag)) |
|
|
self.writeraw(self.end_tag(tag)) |
|
|
|
|
|
|
|
|
def generate_empty_block_tag(self, tag: str, attributes: dict[str,str]={}): |
|
|
def generate_empty_block_tag(self, tag: str, attributes: dict[str,str]={}): |
|
|
self.writeln(self.single_tag(tag, attributes)) |
|
|
self.writeln(self.single_tag(tag, attributes)) |
|
@ -370,6 +371,8 @@ class OutputGenerator: |
|
|
self.generate(e.content) |
|
|
self.generate(e.content) |
|
|
self.write("\"") |
|
|
self.write("\"") |
|
|
|
|
|
|
|
|
|
|
|
def generate_FileLink(self, e: FileLink): |
|
|
|
|
|
self.generate_simple_tag(e) |
|
|
|
|
|
|
|
|
# Inline Elements |
|
|
# Inline Elements |
|
|
def generate_Cite(self, e: Cite): |
|
|
def generate_Cite(self, e: Cite): |
|
|