#13: Přidáno deprecation varování do původní html funkce.
This commit is contained in:
parent
fe0345570c
commit
cfbe3e128d
1 changed files with 6 additions and 1 deletions
|
@ -13,8 +13,13 @@ from .util import inlinify
|
||||||
from .context import Group
|
from .context import Group
|
||||||
from .images import ImageProcessor
|
from .images import ImageProcessor
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
warnings.warn("The html function has been deprecated, is left only for reference and will be removed in future commits. HTML_generator should be used in its place.", DeprecationWarning)
|
||||||
|
|
||||||
def html(e: Union[Element, ListContainer], k: KatexClient, i: ImageProcessor, indent_level: int=0, indent_str: str="\t") -> str:
|
def html(e: Union[Element, ListContainer], k: KatexClient, i: ImageProcessor, indent_level: int=0, indent_str: str="\t") -> str:
|
||||||
|
|
||||||
|
warnings.warn("The html function has been deprecated, is left only for reference and will be removed in future commits. HTML_generator should be used in its place.", DeprecationWarning)
|
||||||
|
|
||||||
# `only` attribute which makes transformed elements appear only in tex
|
# `only` attribute which makes transformed elements appear only in tex
|
||||||
# output or html output
|
# output or html output
|
||||||
if hasattr(e, "attributes") and "only" in e.attributes and e.attributes["only"] != "html":
|
if hasattr(e, "attributes") and "only" in e.attributes and e.attributes["only"] != "html":
|
||||||
|
|
Loading…
Reference in a new issue