github-markdown 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/markdown/markdown.c +18 -4
- 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: b588334527838ef5b385a6906dd1e47839a82b01
|
4
|
+
data.tar.gz: b0fa1d69efbaea4147d67eeec64662ac6f2f2d4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a891bf2acfa053a96ce25572094d781afc6996815824cea9b70537ae991d7f9fe986fbb367838161e48790085de3080ec06a667bf3c0a74589f5960048ac14d5
|
7
|
+
data.tar.gz: 2ef8bcb62e94418c1addcba28dec5ed864458f7e3fea8c5a14dcdae79a89c34b81e70ae894b6e1fe05f6f0969f4c29ebd0cadb6b66ca88f0fda3fe370537db90
|
data/ext/markdown/markdown.c
CHANGED
@@ -394,7 +394,7 @@ find_emph_char(uint8_t *data, size_t size, uint8_t c)
|
|
394
394
|
size_t i = 1;
|
395
395
|
|
396
396
|
while (i < size) {
|
397
|
-
while (i < size && data[i] != c && data[i] != '
|
397
|
+
while (i < size && data[i] != c && data[i] != '[')
|
398
398
|
i++;
|
399
399
|
|
400
400
|
if (i == size)
|
@@ -896,10 +896,18 @@ char_link(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offset
|
|
896
896
|
link_b = i;
|
897
897
|
|
898
898
|
/* looking for link end: ' " ) */
|
899
|
+
/* Count the number of open parenthesis */
|
900
|
+
size_t nb_p = 0;
|
901
|
+
|
899
902
|
while (i < size) {
|
900
903
|
if (data[i] == '\\') i += 2;
|
901
|
-
else if (data[i] == '
|
902
|
-
|
904
|
+
else if (data[i] == '(' && i != 0) {
|
905
|
+
nb_p++; i++;
|
906
|
+
}
|
907
|
+
else if (data[i] == ')') {
|
908
|
+
if (nb_p == 0) break;
|
909
|
+
nb_p--; i++;
|
910
|
+
} else if (i >= 1 && _isspace(data[i-1]) && (data[i] == '\'' || data[i] == '"')) break;
|
903
911
|
else i++;
|
904
912
|
}
|
905
913
|
|
@@ -1690,8 +1698,14 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
|
|
1690
1698
|
previous_indent = pre;
|
1691
1699
|
|
1692
1700
|
if (rndr->ext_flags & MKDEXT_FENCED_CODE) {
|
1693
|
-
if (is_codefence(data + beg + i, end - beg - i, NULL) != 0)
|
1701
|
+
if (is_codefence(data + beg + i, end - beg - i, NULL) != 0) {
|
1702
|
+
/* If the fenced code isn't indented, then end the list */
|
1703
|
+
if (pre == 0 && !in_fence) {
|
1704
|
+
*flags |= MKD_LI_END;
|
1705
|
+
break;
|
1706
|
+
}
|
1694
1707
|
in_fence = !in_fence;
|
1708
|
+
}
|
1695
1709
|
}
|
1696
1710
|
|
1697
1711
|
/* Only check for new list items if we are **not** inside
|
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.4'
|
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'
|