feature: ability to detect includes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import pytest
|
||||
from mistletoe import Document
|
||||
|
||||
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
|
||||
|
||||
|
||||
@pytest.mark.html
|
||||
def test_include_html():
|
||||
assertions = {
|
||||
'[include:ident]': "<p>ident</p>\n",
|
||||
}
|
||||
|
||||
def test_function(input):
|
||||
return f"{input}"
|
||||
|
||||
with FiftyOhmHtmlRenderer(include_handler=test_function) as renderer:
|
||||
for assertion in assertions:
|
||||
assert renderer.render(Document(assertion)) == assertions[assertion]
|
||||
Reference in New Issue
Block a user