Skip to content

Commit 7027b92

Browse files
committed
Sync with 12.3.2
1 parent 90f32c5 commit 7027b92

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
12.3.0
1+
12.3.2
22
-------
33

4-
Synced with markdown-it 12.3.0, see the [CHANGELOG](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
4+
Synced with markdown-it 12.3.2, see the [CHANGELOG](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
55

66
12.0.6
77
-------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Ruby/RubyMotion version of Markdown-it (CommonMark compliant and extendable)
77

88
This gem is a port of the [markdown-it Javascript package](https://github.com/markdown-it/markdown-it) by Vitaly Puzrin and Alex Kocharin.
99

10-
_Currently synced with markdown-it 12.3.0_
10+
_Currently synced with markdown-it 12.3.2_
1111

1212
---
1313

lib/motion-markdown-it/rules_block/list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def self.list(state, startLine, endLine, silent)
129129
# This code can fail if plugins use blkIndent as well as lists,
130130
# but I hope the spec gets fixed long before that happens.
131131
#
132-
if state.tShift[startLine] >= state.blkIndent
132+
if state.sCount[startLine] >= state.blkIndent
133133
isTerminatingParagraph = true
134134
end
135135
end

lib/motion-markdown-it/rules_inline/newline.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ def self.newline(state, silent)
2020
if !silent
2121
if pmax >= 0 && charCodeAt(state.pending, pmax) == 0x20
2222
if pmax >= 1 && charCodeAt(state.pending, pmax - 1) == 0x20
23-
state.pending = state.pending.sub(/ +$/, '')
23+
# Find whitespaces tail of pending chars.
24+
ws = pmax - 1
25+
while (ws >= 1 && charCodeAt(state.pending, ws - 1) == 0x20)
26+
ws -= 1
27+
end
28+
29+
state.pending = state.pending.slice(0...ws)
2430
state.push('hardbreak', 'br', 0)
2531
else
2632
state.pending = state.pending.slice(0...-1)

lib/motion-markdown-it/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module MotionMarkdownIt
2-
VERSION = '12.3.0'
2+
VERSION = '12.3.2'
33
end

spec/motion-markdown-it/fixtures/markdown-it/commonmark_extras.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,27 @@ Regression test (code block + regular paragraph)
146146
</blockquote>
147147
.
148148

149+
Regression test (tabs in lists, #830)
150+
.
151+
1. asd
152+
2. asd
153+
154+
---
155+
156+
1. asd
157+
2. asd
158+
.
159+
<ol>
160+
<li>asd
161+
2. asd</li>
162+
</ol>
163+
<hr>
164+
<ol>
165+
<li>asd
166+
2. asd</li>
167+
</ol>
168+
.
169+
149170
Blockquotes inside indented lists should terminate correctly
150171
.
151172
- a

0 commit comments

Comments
 (0)