nixos-render-docs: fix tests for markdown-it-py 3
parsing of escaped text has changed internally, but apart from Token field contents that we only inspect in tests the change is *mostly* invisible to us. some bits of documentation now parse differently and need to be adjusted, but those were slightly questionable to begin with.
This commit is contained in:
parent
0706efa1bc
commit
e11cac622e
@ -208,7 +208,7 @@ def test_attr_span_escaping() -> None:
|
|||||||
content='\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False,
|
content='\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False,
|
||||||
children=[
|
children=[
|
||||||
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
||||||
content='[a]{#bar}', markup='', info='', meta={}, block=False, hidden=False)
|
content='[a]{#bar}', markup='\\[', info='escape', meta={}, block=False, hidden=False)
|
||||||
]),
|
]),
|
||||||
Token(type='paragraph_close', tag='p', nesting=-1, attrs={}, map=None, level=0, children=None,
|
Token(type='paragraph_close', tag='p', nesting=-1, attrs={}, map=None, level=0, children=None,
|
||||||
content='', markup='', info='', meta={}, block=True, hidden=False)
|
content='', markup='', info='', meta={}, block=True, hidden=False)
|
||||||
@ -220,7 +220,7 @@ def test_attr_span_escaping() -> None:
|
|||||||
content='\\\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False,
|
content='\\\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False,
|
||||||
children=[
|
children=[
|
||||||
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
||||||
content='\\', markup='', info='', meta={}, block=False, hidden=False),
|
content='\\', markup='\\\\', info='escape', meta={}, block=False, hidden=False),
|
||||||
Token(type='attr_span_begin', tag='span', nesting=1, attrs={'id': 'bar'}, map=None, level=0,
|
Token(type='attr_span_begin', tag='span', nesting=1, attrs={'id': 'bar'}, map=None, level=0,
|
||||||
children=None, content='', markup='', info='', meta={}, block=False, hidden=False),
|
children=None, content='', markup='', info='', meta={}, block=False, hidden=False),
|
||||||
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=1, children=None,
|
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=1, children=None,
|
||||||
@ -237,7 +237,7 @@ def test_attr_span_escaping() -> None:
|
|||||||
Token(type='inline', tag='', nesting=0, attrs={}, map=[0, 1], level=1,
|
Token(type='inline', tag='', nesting=0, attrs={}, map=[0, 1], level=1,
|
||||||
children=[
|
children=[
|
||||||
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
Token(type='text', tag='', nesting=0, attrs={}, map=None, level=0, children=None,
|
||||||
content='\\[a]{#bar}', markup='', info='', meta={}, block=False, hidden=False)
|
content='\\[a]{#bar}', markup='\\\\', info='escape', meta={}, block=False, hidden=False)
|
||||||
],
|
],
|
||||||
content='\\\\\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False),
|
content='\\\\\\[a]{#bar}', markup='', info='', meta={}, block=True, hidden=False),
|
||||||
Token(type='paragraph_close', tag='p', nesting=-1, attrs={}, map=None, level=0, children=None,
|
Token(type='paragraph_close', tag='p', nesting=-1, attrs={}, map=None, level=0, children=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user