diff --git a/md2zhihu/__init__.py b/md2zhihu/__init__.py index 92737f9..5bc3404 100644 --- a/md2zhihu/__init__.py +++ b/md2zhihu/__init__.py @@ -1418,6 +1418,7 @@ def __init__(self, conf: Config, md_text: str): self.ast = parse_in_list_tables(self.ast) + # TODO: optional disable replacing ref self.used_refs = replace_ref_with_def(self.ast, self.refs) # extract already inlined math @@ -1427,6 +1428,7 @@ def __init__(self, conf: Config, md_text: str): join_math_block(self.ast) self.ast = parse_math(self.ast) + # TODO: optional disable embed self.parse_embed() def parse_embed(self): @@ -1435,7 +1437,6 @@ def parse_embed(self): self.used_refs.update(used_refs) def render(self): - mdr = MDRender(self.conf, features=self.conf.features) root_node = { diff --git a/test.sh b/test.sh index 48e2ddb..4d74f45 100755 --- a/test.sh +++ b/test.sh @@ -11,4 +11,4 @@ python setup.py install # PYTHONPATH="$(cd ..; pwd)" pytest -x -v # PYTHONPATH="$(cd ..; pwd)" pytest -x -v -k test_simple # PYTHONPATH="$(cd ..; pwd)" pytest -x -v --show-capture=all -k test_minimal_mistake -PYTHONPATH="$(cd ..; pwd)" pytest -x -v --show-capture=all -k test_github +PYTHONPATH="$(cd ..; pwd)" pytest -x -v --show-capture=all -k test_weibo diff --git a/test/data/weibo/want/simple.md b/test/data/weibo/want/simple.md index 04db1ba..d6b3b55 100644 --- a/test/data/weibo/want/simple.md +++ b/test/data/weibo/want/simple.md @@ -121,7 +121,9 @@ table in list: Reference: - slim : [https://github.com/openacid/slim](https://github.com/openacid/slim) + - slimarray : [https://github.com/openacid/slimarray](https://github.com/openacid/slimarray) + [slim]: https://github.com/openacid/slim "slim" [slimarray]: https://github.com/openacid/slimarray "slimarray"