diff --git a/markdown/htmlparser.py b/markdown/htmlparser.py index b457fb653..ee67ac10d 100644 --- a/markdown/htmlparser.py +++ b/markdown/htmlparser.py @@ -83,7 +83,7 @@ def at_line_start(self): if self.offset > 3: return False # Confirm up to first 3 chars are whitespace - return self.rawdata[self.line_offset:self.offset].strip() == '' + return self.rawdata[self.line_offset:self.line_offset + self.offset].strip() == '' def handle_starttag(self, tag, attrs): self.stack.append(tag) diff --git a/tests/test_syntax/blocks/test_html_blocks.py b/tests/test_syntax/blocks/test_html_blocks.py index ceb65b804..6e4406cbe 100644 --- a/tests/test_syntax/blocks/test_html_blocks.py +++ b/tests/test_syntax/blocks/test_html_blocks.py @@ -227,7 +227,6 @@ def test_raw_surrounded_by_text_without_blank_lines(self): ) ) - # TODO: Fix this. Not sure why its failing... def test_multiline_markdown_with_code_span(self): self.assertMarkdownRenders( self.dedent( @@ -240,8 +239,8 @@ def test_multiline_markdown_with_code_span(self): self.dedent( """

A paragraph with a block-level - <p>code span</p>. - More Markdown text.

+ <p>code span</p>, which is + at the start of a line.

""" ) )