You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you meant: r'(\n\Z|\n[ \t]{{0,{len_prefix}}}(?=\S))'?
Details
if I have this:
""" My comment .. code-block:: python test_my_code("Hello World") """
the PythonCodeBlockParser fails. For example:
.tox/local/lib/python3.8/site-packages/sybil/integration/pytest.py:104: in collect
self.document = self.sybil.parse(Path(self.fspath.strpath))
.tox/local/lib/python3.8/site-packages/sybil/sybil.py:144: in parse
return type_.parse(str(path), *self.parsers, encoding=self.encoding)
.tox/local/lib/python3.8/site-packages/sybil/document.py:201: in parse
forregionin parser(docstring_document):
.tox/local/lib/python3.8/site-packages/sybil/parsers/abstract/codeblock.py:46: in __call__
forlexedin chain(*(lexer(document) forlexerin self.lexers)):
.tox/local/lib/python3.8/site-packages/sybil/parsers/abstract/lexers.py:59: in __call__
raise LexingException(
E sybil.parsers.abstract.lexers.LexingException: Could not match '(\n\\Z|\n[ \t]{0,8}(?=\\S))'in my_python.py (truncated)
Neither does this work because my IDE always elides extra whitespace:
""" My comment .. code-block:: python test_my_code("Hello World") """
If I do this it will work:
""" My comment .. code-block:: python test_my_code("Hello World")\ """
or this works too:
""" My comment .. code-block:: python test_my_code("Hello World") Any other rst comment text here. """
The text was updated successfully, but these errors were encountered:
(Found in Sybil 4.0.1)
TLDR
Unescaped tokens in
END_PATTERN_TEMPLATE = '(\n\\Z|\n[ \t]{{0,{len_prefix}}}(?=\\S))'
I think you meant:
r'(\n\Z|\n[ \t]{{0,{len_prefix}}}(?=\S))'
?Details
if I have this:
the PythonCodeBlockParser fails. For example:
Neither does this work because my IDE always elides extra whitespace:
If I do this it will work:
or this works too:
The text was updated successfully, but these errors were encountered: