Small fix for bullet parsing.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a6e26ea84f
commit
e212e38e8a
|
@ -43,7 +43,7 @@ t_IMG_END = r"\]\]"
|
|||
t_RESULTS_END = r"^\s*$"
|
||||
t_END_LABELS = r"^(?!\[|\#).*"
|
||||
t_BULLET_START = r"^\s*[\+|\-|0-9\.]"
|
||||
t_BULLET_END = r"^\s*(?![\+|\-|0-9]).*$"
|
||||
t_BULLET_END = r"^(?!\s*[\+|\-|0-9\.]).*$"
|
||||
|
||||
t_HEADER = r"^\*+"
|
||||
t_META_OTHER = r"^[#]\+[A-Z\_]+\:"
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__=0.84
|
||||
__version__=0.85
|
||||
|
|
|
@ -201,10 +201,28 @@ def test_bullet_block():
|
|||
assert result[1].token == tokens.BULLET
|
||||
assert result[1].value == expected[1].value
|
||||
|
||||
text = StringIO(
|
||||
"""
|
||||
- Bullet 1
|
||||
- Bullet 2
|
||||
-Bullet 3"""
|
||||
)
|
||||
|
||||
expected = [
|
||||
Token(tokens.BLANK, ""),
|
||||
Token(tokens.BULLET, """- Bullet 1\n- Bullet 2\n -Bullet 3\n"""),
|
||||
]
|
||||
result = parse(text).doc
|
||||
assert result[0].token == tokens.BLANK
|
||||
assert result[0].value == expected[0].value
|
||||
assert result[1].token == tokens.BULLET
|
||||
assert result[1].value == expected[1].value
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_src_block_images():
|
||||
text = StringIO("""
|
||||
text = StringIO(
|
||||
"""
|
||||
#+BEGIN_SRC latex :exports results :file test.png :results raw file
|
||||
\begin{equation}
|
||||
x=\sqrt{b}
|
||||
|
@ -213,12 +231,14 @@ x=\sqrt{b}
|
|||
|
||||
#+RESULTS:
|
||||
[[file:test.png]]
|
||||
""")
|
||||
"""
|
||||
)
|
||||
expected = [
|
||||
Token(tokens.BLANK, ""),
|
||||
Token(tokens.SOURCE, """\begin{equation}\nx=\sqrt{b}\n\end{equation}"""),
|
||||
Token(
|
||||
tokens.SOURCE, """\begin{equation}\nx=\sqrt{b}\n\end{equation}"""
|
||||
),
|
||||
Token(tokens.BLANK, ""),
|
||||
|
||||
]
|
||||
result = parse(text).doc
|
||||
assert result[0].token == tokens.BLANK
|
||||
|
|
Loading…
Reference in New Issue