Deprecate transform.py.
This commit is contained in:
parent
dc48cd411c
commit
b6634ddede
1 changed files with 5 additions and 0 deletions
|
@ -10,10 +10,15 @@ from .command import Command, BlockCommand, InlineCommand
|
||||||
from .command_util import handle_command_define, parse_command
|
from .command_util import handle_command_define, parse_command
|
||||||
from .elements import FQuoted
|
from .elements import FQuoted
|
||||||
|
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
warnings.warn("The transform function has been deprecated, is left only for reference and will be removed in future commits. TransformProcessor should be used in its place.", DeprecationWarning)
|
||||||
|
|
||||||
# This is where tha magic happens. This function transforms a single element,
|
# This is where tha magic happens. This function transforms a single element,
|
||||||
# to transform the entire tree, panflute's walk should be used.
|
# to transform the entire tree, panflute's walk should be used.
|
||||||
def transform(e: Element, c: Context) -> Element:
|
def transform(e: Element, c: Context) -> Element:
|
||||||
|
|
||||||
|
warnings.warn("The transform function has been deprecated, is left only for reference and will be removed in future commits. TransformProcessor should be used in its place.", DeprecationWarning)
|
||||||
# Determine if this space should be non-breakable. See whitespace.py.
|
# Determine if this space should be non-breakable. See whitespace.py.
|
||||||
if isinstance(e, Whitespace) and bavlna(e, c):
|
if isinstance(e, Whitespace) and bavlna(e, c):
|
||||||
e = NBSP()
|
e = NBSP()
|
||||||
|
|
Loading…
Reference in a new issue