PandocProcessor nyní předělává i NBSP.
This commit is contained in:
parent
0dcad55bb8
commit
20c1ba29a2
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue