Skip to content

Commit

Permalink
Added comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rossant committed Mar 4, 2015
1 parent a239ac4 commit 1d464bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ipymd/formats/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class MarkdownReader(BaseMarkdownReader):

def _has_input_prompt(self, lines):
"""Return whether the line or set of lines has an input prompt."""
# Note: the rstrip() is necessary for empty lines with the
# leading '...' prompt but not the trailing space. See PR #25.
if isinstance(lines, list):
return any(line for line in lines
if line.startswith(self.prompt_first.rstrip()))
Expand Down
2 changes: 1 addition & 1 deletion ipymd/formats/tests/test_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_markdown_markdown():


def test_decorator():

"""Test a bug fix where empty '...' lines were added to the output."""
markdown = '\n'.join(('```python',
'>>> @decorator',
'... def f():',
Expand Down

0 comments on commit 1d464bc

Please sign in to comment.