github-markdown 0.6.7 → 0.6.8

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: 0e82a12c8f502be0b25a184c0d64f3f9a1b34f28
4
- data.tar.gz: ee0fcb46a6dfacad26dae9e96fb97158b7ca5da3
3
+ metadata.gz: e97baad603e3bae831e7f90acc332ede4bff6b12
4
+ data.tar.gz: 6bd93a2c15ed4d79c49d3e8cfb8cdd84189d424b
5
5
  SHA512:
6
- metadata.gz: 9f46e7837ac995778eb868eca67d398ed0b2e3148854c2609ac295d5884f225dbc708603442671feec9d5deb04d875bf493a03956b7752e2a4fe52f52a7c9eff
7
- data.tar.gz: 1cddaba6030d05ccfb0c82e178afcbfa9e29b08a790eda845cfa27a75acca8d590c74cd596446167bce8ba8ec26149b59cf295d8566ff35c6dd5eb7c8484f6ee
6
+ metadata.gz: 85b4094015641be9cb7fc7bea28c60367a0021fc1cc08473684d88cda0ef70815f41a4a8568968a0a61e7e6f1b4e694b9d3dc1921197537cea4babf699ac2aff
7
+ data.tar.gz: f223c5be41dfec0a79854cbe97bcb7516d8d470422a2d9ab4c326e82649eea67121fed452f71a308cd6bd53c8b9c405f188e7cc99db9a6c0fed6fe0cb3a38922
@@ -306,12 +306,12 @@ tag_length(uint8_t *data, size_t size, enum mkd_autolink *autolink)
306
306
 
307
307
  /* begins with a '<' optionally followed by '/', followed by letter or number */
308
308
  if (data[0] != '<') return 0;
309
-
309
+
310
310
  if ((i = is_mail_autolink(data + 1, size - 1)) != 0) {
311
311
  *autolink = MKDA_EMAIL;
312
312
  return i + 1;
313
313
  }
314
-
314
+
315
315
  i = (data[1] == '/') ? 2 : 1;
316
316
 
317
317
  if (!_isalnum(data[i]))
@@ -508,7 +508,7 @@ parse_emph1(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size
508
508
 
509
509
  if (data[i] == c && !_isspace(data[i - 1])) {
510
510
 
511
- if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) {
511
+ if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS && c == '_') {
512
512
  if (i + 1 < size && (_isalnum(data[i + 1]) || data[i + 1] == c))
513
513
  continue;
514
514
  }
@@ -545,11 +545,11 @@ parse_emph2(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size
545
545
 
546
546
  if (i + 1 < size && data[i] == c && data[i + 1] == c && i && !_isspace(data[i - 1])) {
547
547
 
548
- if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) {
548
+ if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS && c == '_') {
549
549
  if (i + 2 < size && (_isalnum(data[i + 2]) || data[i + 2] == c))
550
550
  continue;
551
551
  }
552
-
552
+
553
553
  work = rndr_newbuf(rndr, BUFFER_SPAN);
554
554
  parse_inline(work, rndr, data, i);
555
555
  r = render_method(ob, work, rndr->opaque);
@@ -580,11 +580,11 @@ parse_emph3(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size
580
580
 
581
581
  if (i + 2 < size && data[i + 1] == c && data[i + 2] == c && rndr->cb.triple_emphasis) {
582
582
 
583
- if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) {
583
+ if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS && c == '_') {
584
584
  if (i + 3 < size && (_isalnum(data[i + 3]) || data[i + 3] == c))
585
585
  continue;
586
586
  }
587
-
587
+
588
588
  /* triple symbol found */
589
589
  struct buf *work = rndr_newbuf(rndr, BUFFER_SPAN);
590
590
 
@@ -616,7 +616,7 @@ char_emphasis(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t of
616
616
  uint8_t c = data[0];
617
617
  size_t ret;
618
618
 
619
- if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) {
619
+ if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS && c == '_') {
620
620
  if (offset > 0 && !_isspace(data[-1]) && (_isalnum(data[-1]) || data[-1] == data[0])) {
621
621
  return 0;
622
622
  }
@@ -1741,7 +1741,7 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s
1741
1741
  if (pre == orgpre) {
1742
1742
  if (empty_lines > 0) {
1743
1743
  has_trailing_empty = 1;
1744
-
1744
+
1745
1745
  /* checking for ul/ol switch */
1746
1746
  if (((*flags & MKD_LIST_ORDERED) && has_next_uli) ||
1747
1747
  (!(*flags & MKD_LIST_ORDERED) && has_next_oli)) {
@@ -2070,18 +2070,18 @@ parse_table_row(
2070
2070
  if (!is_escaped && data[i] == '`') {
2071
2071
  for (nb=0; i < size && data[i] == '`'; i++)
2072
2072
  nb++;
2073
-
2073
+
2074
2074
  for (j=0, code_end=i; code_end < size && j < nb; code_end++) {
2075
2075
  if (data[code_end] == '`') j++;
2076
2076
  else j = 0;
2077
2077
  }
2078
-
2078
+
2079
2079
  /* bail if there's no matching delimiter */
2080
2080
  if (j < nb) {
2081
2081
  i++;
2082
2082
  continue;
2083
2083
  }
2084
-
2084
+
2085
2085
  i = code_end;
2086
2086
  is_escaped = 0;
2087
2087
  }
@@ -2569,9 +2569,9 @@ sd_markdown_render(struct buf *ob, const uint8_t *document, size_t doc_size, str
2569
2569
  /* adding the line body if present */
2570
2570
  if (end > beg) {
2571
2571
  expanded_beg = text->size;
2572
-
2572
+
2573
2573
  expand_tabs(text, document + beg, end - beg);
2574
-
2574
+
2575
2575
  /* check for a fenced code block */
2576
2576
  if ((md->ext_flags & MKDEXT_FENCED_CODE) != 0 &&
2577
2577
  is_codefence(text->data + expanded_beg, text->size - expanded_beg, NULL) != 0)
@@ -1,10 +1,10 @@
1
1
  # encoding: utf-8
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'github-markdown'
4
- s.version = '0.6.7'
4
+ s.version = '0.6.8'
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
- s.date = '2014-09-16'
7
+ s.date = '2014-12-05'
8
8
  s.email = 'vicent@github.com'
9
9
  s.homepage = 'http://github.github.com/github-flavored-markdown/'
10
10
  s.authors = ['GitHub, Inc']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-12-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Self-contained Markdown parser for GitHub, with all our custom extensions
14
14
  email: vicent@github.com