mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
check-templates: Rewrite pretty_print (again).
It now does everything based on the tokens, rather than walking the lines and trying to match up tokens to lines.
This commit is contained in:
@@ -281,8 +281,9 @@ GOOD_HTML11 = """
|
||||
|
||||
|
||||
def pretty_print(html: str) -> str:
|
||||
tokens = validate(fn=None, text=html)
|
||||
return pretty_print_html(html, tokens)
|
||||
fn = "<test str>"
|
||||
tokens = validate(fn=fn, text=html)
|
||||
return pretty_print_html(tokens, fn=fn)
|
||||
|
||||
|
||||
class TestPrettyPrinter(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user