github-markdown 0.6.1 → 0.6.2

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
  SHA1:
3
- metadata.gz: d5e4dc875dd8f6fa856a34e659e0e4ae417492c3
4
- data.tar.gz: 7c2e9f88182ea92f68f4e47a6fb83f34b877f75e
3
+ metadata.gz: 19d16aff6203cbe19ac36ace54ccb2a7a88dd2c6
4
+ data.tar.gz: 582d1569aa3ce50c8d8db6373a440115d9c8ca25
5
5
  SHA512:
6
- metadata.gz: f09c0ec74920d23a6bcc964edd859e862714298dd3e5dce9975973ff13f34fe598502e9c60514988644f68d036220f078c2ca90a1a26c5175ff45caf4247a38c
7
- data.tar.gz: 785aedbbf0988387b7a521b136b26934698764e29313638525d25abad0e1057f6bed43febb2408f298cac4c6c585247fe178850d2205244e7ed2bbbc4314739b
6
+ metadata.gz: 1839dc2e779cff485cc4af0714622dd453e27be5f9cfb18e4b917990285160af239245e6a44a6a8d85fdd72455e206203902163867454db9c344816d5c650dfa
7
+ data.tar.gz: 6c34b036a4d5e3172ef635ee7901b04ed481f2510186edc6484c7a07209a8349d08bc9d111e8d320cfbf090844c14b274e1ef74ddda50cc5f02632821633735e
@@ -1631,7 +1631,7 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1631
1631
  {
1632
1632
  struct buf *work = 0, *inter = 0;
1633
1633
  size_t beg = 0, end, pre, sublist = 0, orgpre = 0, previous_indent = 0, i;
1634
- int in_empty = 0, has_inside_empty = 0, in_fence = 0, previous_indent_diff = 0;
1634
+ int in_empty = 0, has_inside_empty = 0, has_trailing_empty = 0, in_fence = 0, previous_indent_diff = 0;
1635
1635
 
1636
1636
  /* keeping track of the first indentation prefix */
1637
1637
  while (orgpre < 3 && orgpre < size && data[orgpre] == ' ')
@@ -1712,7 +1712,7 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1712
1712
  /* checking for a new item */
1713
1713
  if ((has_next_uli && !is_hrule(data + beg + i, end - beg - i)) || has_next_oli) {
1714
1714
  if (in_empty)
1715
- has_inside_empty = 1;
1715
+ has_trailing_empty = 1;
1716
1716
 
1717
1717
  if (pre == orgpre) /* the following item must have */
1718
1718
  break; /* the same indentation */
@@ -1740,7 +1740,7 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1740
1740
  }
1741
1741
 
1742
1742
  /* render of li contents */
1743
- if (has_inside_empty)
1743
+ if (has_inside_empty || has_trailing_empty)
1744
1744
  *flags |= MKD_LI_BLOCK;
1745
1745
 
1746
1746
  if (*flags & MKD_LI_BLOCK) {
@@ -1761,6 +1761,9 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1761
1761
  parse_inline(inter, rndr, work->data, work->size);
1762
1762
  }
1763
1763
 
1764
+ if (!has_trailing_empty)
1765
+ *flags &= ~MKD_LI_BLOCK;
1766
+
1764
1767
  /* render of li itself */
1765
1768
  if (rndr->cb.listitem)
1766
1769
  rndr->cb.listitem(ob, inter, *flags, rndr->opaque);
@@ -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.1'
4
+ s.version = '0.6.2'
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.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc