github-markdown 0.6.1 → 0.6.2
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 +4 -4
- data/ext/markdown/markdown.c +6 -3
- data/github-markdown.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d16aff6203cbe19ac36ace54ccb2a7a88dd2c6
|
4
|
+
data.tar.gz: 582d1569aa3ce50c8d8db6373a440115d9c8ca25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1839dc2e779cff485cc4af0714622dd453e27be5f9cfb18e4b917990285160af239245e6a44a6a8d85fdd72455e206203902163867454db9c344816d5c650dfa
|
7
|
+
data.tar.gz: 6c34b036a4d5e3172ef635ee7901b04ed481f2510186edc6484c7a07209a8349d08bc9d111e8d320cfbf090844c14b274e1ef74ddda50cc5f02632821633735e
|
data/ext/markdown/markdown.c
CHANGED
@@ -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
|
-
|
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);
|
data/github-markdown.gemspec
CHANGED
@@ -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.
|
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'
|