feat: render units with non-breaking space
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import mistletoe
|
||||
|
||||
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
|
||||
|
||||
from .util import paragraph
|
||||
|
||||
|
||||
def test_unit_html():
|
||||
assertions = {
|
||||
"0,1 V": "0,1 V",
|
||||
"33 A": "33 A",
|
||||
"1 Ah": "1 Ah",
|
||||
"100 mOhm": "100 mΩ",
|
||||
"25 Ohm": "25 Ω",
|
||||
}
|
||||
|
||||
for input, output in assertions.items():
|
||||
assert mistletoe.markdown(input, FiftyOhmHtmlRenderer) == paragraph(output)
|
||||
Reference in New Issue
Block a user