|
|
@ -2,14 +2,12 @@ from .nop_processor import NOPProcessor |
|
|
|
from panflute import Div, Span, Null, Str, Plain, Quoted |
|
|
|
from .context import Group, InlineGroup, BlockGroup |
|
|
|
from .elements import FQuoted |
|
|
|
from .whitespace import NBSP |
|
|
|
from .nop_processor import ELCl |
|
|
|
|
|
|
|
from typing import Callable |
|
|
|
|
|
|
|
import sys |
|
|
|
def eprint(*args, **kwargs): |
|
|
|
print(*args, **kwargs, file=sys.stderr) |
|
|
|
|
|
|
|
class PandocProcessor(NOPProcessor): |
|
|
|
|
|
|
|
def get_posttransformers(self) -> list[Callable[[ELCl],ELCl]]: |
|
|
@ -38,3 +36,6 @@ class PandocProcessor(NOPProcessor): |
|
|
|
|
|
|
|
def transform_FQuoted(self, e: FQuoted) -> Quoted: |
|
|
|
return Quoted(*e.content) |
|
|
|
|
|
|
|
def transform_NBSP(self, e: NBSP) -> Str: |
|
|
|
return Str(" ") # Unicode nbsp |
|
|
|