Skip to content

Commit 182853a

Browse files
committed
Code spans at start of line 2nd attempt.
There were two obvious reasons why that was failing. That's what hapens when I'm in a hurry. Fixed now.
1 parent a0e5d02 commit 182853a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

markdown/htmlparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def at_line_start(self):
8383
if self.offset > 3:
8484
return False
8585
# Confirm up to first 3 chars are whitespace
86-
return self.rawdata[self.line_offset:self.offset].strip() == ''
86+
return self.rawdata[self.line_offset:self.line_offset + self.offset].strip() == ''
8787

8888
def handle_starttag(self, tag, attrs):
8989
self.stack.append(tag)

tests/test_syntax/blocks/test_html_blocks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def test_raw_surrounded_by_text_without_blank_lines(self):
227227
)
228228
)
229229

230-
# TODO: Fix this. Not sure why its failing...
231230
def test_multiline_markdown_with_code_span(self):
232231
self.assertMarkdownRenders(
233232
self.dedent(
@@ -240,8 +239,8 @@ def test_multiline_markdown_with_code_span(self):
240239
self.dedent(
241240
"""
242241
<p>A paragraph with a block-level
243-
<code>&lt;p&gt;code span&lt;/p&gt;</code>.
244-
More <em>Markdown</em> text.</p>
242+
<code>&lt;p&gt;code span&lt;/p&gt;</code>, which is
243+
at the start of a line.</p>
245244
"""
246245
)
247246
)

0 commit comments

Comments
 (0)