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: a7f2ac0d111cfc878b1017c5e3c32d1e9a6b9468176051937bac57f0378e5ac8
4
- data.tar.gz: 13b8f19a17c53fca0f8ae6c8e373f219bb90b9e6152e7d3a9a0b1ad54c3f7c63
3
+ metadata.gz: '0489d301352f960adaa9978744f1dd22181b74149760ba53056a63dc2822eb71'
4
+ data.tar.gz: 0267606372ae4d745d218301a5f18302ea58b7c2339439aeb79201421d203a31
5
5
  SHA512:
6
- metadata.gz: d632e566f5280d655dac450d8e5c9532dc17829ec8c40aee01c1b35df2909f55e467940e2598bf557aa8c4ee85285a0d6bb1801a28ed1ddd3c1a1767a306c9eb
7
- data.tar.gz: f669a717a5d9f56c2f9d9d7669bd329610b0120a2dceeca3334eb72411184b371448d71a03ad04e4ff9d4f7c7d499750f98b091bd1415ba709011193b0fd385b
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.0.0_
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 with - see available presets
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 returns list of block tokens (special token type
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\\2").
70
+ gsub(/(^|[^-])---(?=[^-]|$)/m, "\\1\u2014").
71
71
  # en-dash
72
- gsub(/(^|\s)--(\s|$)/m, "\\1\u2013\\2").
73
- gsub(/(^|[^-\s])--([^-\s]|$)/m, "\\1\u2013\\2")
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
- # treat this as the middle of the word
117
- canOpen = false
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
 
@@ -1,3 +1,3 @@
1
1
  module MotionMarkdownIt
2
- VERSION = '10.0.0'
2
+ VERSION = '11.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-markdown-it
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Walker