github-markdown 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2259a61a92711bdcd173441f680a8562efcb5cf
4
- data.tar.gz: 8864e4e619a0c537b562c09ae6380c2d76fcf2d4
3
+ metadata.gz: d5e4dc875dd8f6fa856a34e659e0e4ae417492c3
4
+ data.tar.gz: 7c2e9f88182ea92f68f4e47a6fb83f34b877f75e
5
5
  SHA512:
6
- metadata.gz: f246c6463214dda999648c480d5612a70e425e1d11ef10c3f066eb07a100fa4f5d8fe668ba268b2c43b1df10803c6cb2ef55ca40ad0e1772226de968cebd7365
7
- data.tar.gz: c9765a24214c9b6b05f24829582c0730e5765ef82526f2975d3d79ba1c37e960b4b500b5a4ce97bd1b15c40e54f2710f0b3bdab59eb272c1626d718ce536d876
6
+ metadata.gz: f09c0ec74920d23a6bcc964edd859e862714298dd3e5dce9975973ff13f34fe598502e9c60514988644f68d036220f078c2ca90a1a26c5175ff45caf4247a38c
7
+ data.tar.gz: 785aedbbf0988387b7a521b136b26934698764e29313638525d25abad0e1057f6bed43febb2408f298cac4c6c585247fe178850d2205244e7ed2bbbc4314739b
@@ -1678,10 +1678,13 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1678
1678
  while (i < 4 && beg + i < end && data[beg + i] == ' ')
1679
1679
  i++;
1680
1680
 
1681
- previous_indent_diff = i - previous_indent;
1682
- /* allow indentations between 2 and 4 spaces to count as a new list */
1683
- if (previous_indent_diff > 1 && previous_indent_diff < 4)
1684
- i = 2;
1681
+ /* don't bother calculating, this is probably the first item if == 0 */
1682
+ if (previous_indent > 0) {
1683
+ previous_indent_diff = i - previous_indent;
1684
+ /* allow indentations between 2 and 4 spaces to count as a new list */
1685
+ if (previous_indent_diff > 1 && previous_indent_diff < 4)
1686
+ i = 2;
1687
+ }
1685
1688
 
1686
1689
  pre = i;
1687
1690
  previous_indent = pre;
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'github-markdown'
4
- s.version = '0.6.0'
4
+ s.version = '0.6.1'
5
5
  s.summary = 'The Markdown parser for GitHub.com'
6
6
  s.description = 'Self-contained Markdown parser for GitHub, with all our custom extensions'
7
7
  s.date = '2013-10-01'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc