motion-markdown-it 10.0.0 → 11.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0489d301352f960adaa9978744f1dd22181b74149760ba53056a63dc2822eb71'
|
4
|
+
data.tar.gz: 0267606372ae4d745d218301a5f18302ea58b7c2339439aeb79201421d203a31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b594bb031e89f3f422603096fbf8abc678f7fc065b69c8d8b854f4c8e8e134c38337f5d662daff09e14010951fdf056a96d5467717406e64399378087b1441c7
|
7
|
+
data.tar.gz: d247938869b5d43dfd772dbfb5bcf10307f404befce83dba8da65559353d22891e59b8ca811e46e6cdd1748d422de6d0c60ed18034be11af2b7d4bae58278253
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Ruby/RubyMotion version of Markdown-it (CommonMark compliant and extendable)
|
|
7
7
|
|
8
8
|
This gem is a port of the [markdown-it Javascript package](https://github.com/markdown-it/markdown-it) by Vitaly Puzrin and Alex Kocharin.
|
9
9
|
|
10
|
-
_Currently synced with markdown-it
|
10
|
+
_Currently synced with markdown-it 11.0.0_
|
11
11
|
|
12
12
|
---
|
13
13
|
|
@@ -274,6 +274,10 @@ md = require('markdown-it')({
|
|
274
274
|
});
|
275
275
|
```
|
276
276
|
|
277
|
+
You can find all rules in sources:
|
278
|
+
[parser_core.js](lib/parser_core.js), [parser_block](lib/parser_block.js),
|
279
|
+
[parser_inline](lib/parser_inline.js).
|
280
|
+
|
277
281
|
|
278
282
|
## Benchmark
|
279
283
|
|
@@ -352,7 +352,7 @@ module MarkdownIt
|
|
352
352
|
# MarkdownIt.configure(presets)
|
353
353
|
#
|
354
354
|
# Batch load of all options and compenent settings. This is internal method,
|
355
|
-
# and you probably will not need it. But if you
|
355
|
+
# and you probably will not need it. But if you will - see available presets
|
356
356
|
# and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
|
357
357
|
#
|
358
358
|
# We strongly recommend to use presets instead of direct config loads. That
|
@@ -474,7 +474,7 @@ module MarkdownIt
|
|
474
474
|
# - src (String): source string
|
475
475
|
# - env (Object): environment sandbox
|
476
476
|
#
|
477
|
-
# Parse input string and
|
477
|
+
# Parse input string and return list of block tokens (special token type
|
478
478
|
# "inline" will contain list of inline tokens). You should not call this
|
479
479
|
# method directly, until you write custom renderer (for example, to produce
|
480
480
|
# AST).
|
@@ -542,4 +542,4 @@ module MarkdownIt
|
|
542
542
|
end
|
543
543
|
|
544
544
|
end
|
545
|
-
end
|
545
|
+
end
|
@@ -67,10 +67,10 @@ module MarkdownIt
|
|
67
67
|
gsub(/\.{2,}/, '…').gsub(/([?!])…/, "\\1..").
|
68
68
|
gsub(/([?!]){4,}/, '\\1\\1\\1').gsub(/,{2,}/, ',').
|
69
69
|
# em-dash
|
70
|
-
gsub(/(^|[^-])---([^-]|$)/m, "\\1\u2014
|
70
|
+
gsub(/(^|[^-])---(?=[^-]|$)/m, "\\1\u2014").
|
71
71
|
# en-dash
|
72
|
-
gsub(/(^|\s)--(
|
73
|
-
gsub(/(^|[^-\s])--([^-\s]|$)/m, "\\1\u2013
|
72
|
+
gsub(/(^|\s)--(?=\s|$)/m, "\\1\u2013").
|
73
|
+
gsub(/(^|[^-\s])--(?=[^-\s]|$)/m, "\\1\u2013")
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -113,8 +113,14 @@ module MarkdownIt
|
|
113
113
|
end
|
114
114
|
|
115
115
|
if (canOpen && canClose)
|
116
|
-
#
|
117
|
-
|
116
|
+
# Replace quotes in the middle of punctuation sequence, but not
|
117
|
+
# in the middle of the words, i.e.:
|
118
|
+
#
|
119
|
+
# 1. foo " bar " baz - not replaced
|
120
|
+
# 2. foo-"-bar-"-baz - replaced
|
121
|
+
# 3. foo"bar"baz - not replaced
|
122
|
+
#
|
123
|
+
canOpen = isLastPunctChar
|
118
124
|
canClose = isNextPunctChar
|
119
125
|
end
|
120
126
|
|