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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cee1e2fb01f05a2821b465f3c7c00471324ee816
4
- data.tar.gz: 022638f053f01dbaacd5734757c8deefe807ed57
3
+ metadata.gz: b588334527838ef5b385a6906dd1e47839a82b01
4
+ data.tar.gz: b0fa1d69efbaea4147d67eeec64662ac6f2f2d4f
5
5
  SHA512:
6
- metadata.gz: e158d6c2773134f9d8e57b2fed9a56facc572788b1e302dfe277bdb881fb91ab052eb0f19e35018f719162d691954b9d02a966afe792d4d294c9ac2a823507c9
7
- data.tar.gz: dfd268126f837092c0d3e49346731441b953710b94b7d376b7869dcdb35933f89f98fad6a656b64cf5506a3dc45213ce91811c9c5e298f0dfa0bffcdc0d3d64e
6
+ metadata.gz: a891bf2acfa053a96ce25572094d781afc6996815824cea9b70537ae991d7f9fe986fbb367838161e48790085de3080ec06a667bf3c0a74589f5960048ac14d5
7
+ data.tar.gz: 2ef8bcb62e94418c1addcba28dec5ed864458f7e3fea8c5a14dcdae79a89c34b81e70ae894b6e1fe05f6f0969f4c29ebd0cadb6b66ca88f0fda3fe370537db90
@@ -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] != '`' && 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] == ')') break;
902
- else if (i >= 1 && _isspace(data[i-1]) && (data[i] == '\'' || data[i] == '"')) break;
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
@@ -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.3'
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'
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.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc