Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ private void findNextNonSpace() {
}

private void setNewIndex(int newIndex) {
if (newIndex == index) {
// Staying where we are, so keep a partially consumed tab (e.g. after ">\t") as it is
return;
}
if (newIndex >= nextNonSpace) {
// We can start from here, no need to calculate tab stops again
index = nextNonSpace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,12 @@ public void codeSpansAfterUnclosedBackticks() {
assertRendering(
"`` `a` `c` `e`", "<p>`` <code>a</code> <code>c</code> <code>e</code></p>\n");
}

@Test
public void htmlBlockInBlockQuoteAfterPartiallyConsumedTab() {
// The tab after ">" is 3 columns wide; one is consumed by the block quote marker and the
// remaining 2 belong to the HTML block content, same as for other block types
assertRendering(">\t<div>", "<blockquote>\n <div>\n</blockquote>\n");
assertRendering("> <div>\n>\tfoo", "<blockquote>\n<div>\n foo\n</blockquote>\n");
}
}