commonmarker 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of commonmarker might be problematic. Click here for more details.

Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/ext/commonmarker/cmark/CMakeLists.txt +3 -3
  3. data/ext/commonmarker/cmark/Makefile +2 -3
  4. data/ext/commonmarker/cmark/README.md +1 -1
  5. data/ext/commonmarker/cmark/api_test/main.c +15 -0
  6. data/ext/commonmarker/cmark/appveyor.yml +4 -2
  7. data/ext/commonmarker/cmark/build/CMakeCache.txt +86 -14
  8. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CMakeCCompiler.cmake +9 -5
  9. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CMakeCXXCompiler.cmake +9 -5
  10. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2/CMakeDetermineCompilerABI_CXX.bin → 3.5.1/CMakeDetermineCompilerABI_C.bin} +0 -0
  11. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2/CMakeDetermineCompilerABI_C.bin → 3.5.1/CMakeDetermineCompilerABI_CXX.bin} +0 -0
  12. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CMakeSystem.cmake +4 -4
  13. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CompilerIdC/CMakeCCompilerId.c +39 -3
  14. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CompilerIdC/a.out +0 -0
  15. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CompilerIdCXX/CMakeCXXCompilerId.cpp +38 -3
  16. data/ext/commonmarker/cmark/build/CMakeFiles/{3.3.2 → 3.5.1}/CompilerIdCXX/a.out +0 -0
  17. data/ext/commonmarker/cmark/build/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  18. data/ext/commonmarker/cmark/build/CMakeFiles/CMakeError.log +6 -6
  19. data/ext/commonmarker/cmark/build/CMakeFiles/CMakeOutput.log +171 -167
  20. data/ext/commonmarker/cmark/build/CMakeFiles/Makefile.cmake +107 -104
  21. data/ext/commonmarker/cmark/build/CMakeFiles/Makefile2 +42 -42
  22. data/ext/commonmarker/cmark/build/CMakeFiles/TargetDirectories.txt +36 -1
  23. data/ext/commonmarker/cmark/build/CMakeFiles/feature_tests.bin +0 -0
  24. data/ext/commonmarker/cmark/build/CMakeFiles/feature_tests.c +1 -1
  25. data/ext/commonmarker/cmark/build/CMakeFiles/feature_tests.cxx +1 -1
  26. data/ext/commonmarker/cmark/build/Makefile +23 -23
  27. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  28. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/DependInfo.cmake +3 -0
  29. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/build.make +13 -13
  30. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/flags.make +7 -3
  31. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/link.txt +1 -1
  32. data/ext/commonmarker/cmark/build/api_test/Makefile +10 -10
  33. data/ext/commonmarker/cmark/build/man/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  34. data/ext/commonmarker/cmark/build/man/Makefile +10 -10
  35. data/ext/commonmarker/cmark/build/src/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  36. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/DependInfo.cmake +3 -0
  37. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/build.make +63 -63
  38. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/flags.make +4 -2
  39. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/DependInfo.cmake +4 -1
  40. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/build.make +83 -83
  41. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/cmake_clean.cmake +1 -1
  42. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/flags.make +4 -2
  43. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/link.txt +1 -1
  44. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/DependInfo.cmake +3 -0
  45. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/blocks.c.o +0 -0
  46. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/buffer.c.o +0 -0
  47. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/build.make +60 -60
  48. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/cmark.c.o +0 -0
  49. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/cmark_ctype.c.o +0 -0
  50. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/commonmark.c.o +0 -0
  51. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/depend.internal +1 -1
  52. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/depend.make +1 -1
  53. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/flags.make +4 -2
  54. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/houdini_href_e.c.o +0 -0
  55. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/houdini_html_e.c.o +0 -0
  56. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/houdini_html_u.c.o +0 -0
  57. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/html.c.o +0 -0
  58. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/inlines.c.o +0 -0
  59. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/iterator.c.o +0 -0
  60. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/latex.c.o +0 -0
  61. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/link.txt +1 -1
  62. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/man.c.o +0 -0
  63. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/node.c.o +0 -0
  64. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/references.c.o +0 -0
  65. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/render.c.o +0 -0
  66. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/scanners.c.o +0 -0
  67. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/utf8.c.o +0 -0
  68. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/xml.c.o +0 -0
  69. data/ext/commonmarker/cmark/build/src/Makefile +82 -82
  70. data/ext/commonmarker/cmark/build/src/cmake_install.cmake +2 -2
  71. data/ext/commonmarker/cmark/build/src/cmark_version.h +2 -2
  72. data/ext/commonmarker/cmark/build/src/libcmark.a +0 -0
  73. data/ext/commonmarker/cmark/build/src/libcmark.pc +1 -1
  74. data/ext/commonmarker/cmark/build/testdir/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  75. data/ext/commonmarker/cmark/build/testdir/CTestTestfile.cmake +1 -0
  76. data/ext/commonmarker/cmark/build/testdir/Makefile +10 -10
  77. data/ext/commonmarker/cmark/changelog.txt +72 -0
  78. data/ext/commonmarker/cmark/man/CMakeLists.txt +5 -3
  79. data/ext/commonmarker/cmark/man/man1/cmark.1 +2 -2
  80. data/ext/commonmarker/cmark/man/man3/cmark.3 +10 -10
  81. data/ext/commonmarker/cmark/src/CMakeLists.txt +2 -2
  82. data/ext/commonmarker/cmark/src/blocks.c +407 -245
  83. data/ext/commonmarker/cmark/src/buffer.c +3 -2
  84. data/ext/commonmarker/cmark/src/cmark.h +3 -3
  85. data/ext/commonmarker/cmark/src/commonmark.c +5 -5
  86. data/ext/commonmarker/cmark/src/html.c +3 -3
  87. data/ext/commonmarker/cmark/src/inlines.c +11 -11
  88. data/ext/commonmarker/cmark/src/latex.c +2 -2
  89. data/ext/commonmarker/cmark/src/main.c +2 -1
  90. data/ext/commonmarker/cmark/src/man.c +1 -1
  91. data/ext/commonmarker/cmark/src/node.c +2 -2
  92. data/ext/commonmarker/cmark/src/parser.h +2 -0
  93. data/ext/commonmarker/cmark/src/render.c +2 -2
  94. data/ext/commonmarker/cmark/src/scanners.c +2431 -2620
  95. data/ext/commonmarker/cmark/src/xml.c +3 -2
  96. data/ext/commonmarker/cmark/test/CMakeLists.txt +7 -0
  97. data/ext/commonmarker/cmark/test/regression.txt +34 -0
  98. data/ext/commonmarker/cmark/test/spec.txt +49 -6
  99. data/ext/commonmarker/cmark/test/spec_tests.py +1 -1
  100. data/ext/commonmarker/cmark/tools/appveyor-build.bat +13 -0
  101. data/lib/commonmarker/version.rb +1 -1
  102. metadata +13 -11
@@ -9,6 +9,8 @@
9
9
  #include "buffer.h"
10
10
  #include "houdini.h"
11
11
 
12
+ #define BUFFER_SIZE 100
13
+
12
14
  // Functions to convert cmark_nodes to XML strings.
13
15
 
14
16
  static void escape_xml(cmark_strbuf *dest, const unsigned char *source,
@@ -21,7 +23,7 @@ struct render_state {
21
23
  int indent;
22
24
  };
23
25
 
24
- static inline void indent(struct render_state *state) {
26
+ static CMARK_INLINE void indent(struct render_state *state) {
25
27
  int i;
26
28
  for (i = 0; i < state->indent; i++) {
27
29
  cmark_strbuf_putc(state->xml, ' ');
@@ -34,7 +36,6 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type,
34
36
  bool literal = false;
35
37
  cmark_delim_type delim;
36
38
  bool entering = (ev_type == CMARK_EVENT_ENTER);
37
- const size_t BUFFER_SIZE = 100;
38
39
  char buffer[BUFFER_SIZE];
39
40
 
40
41
  if (entering) {
@@ -53,6 +53,13 @@ IF (PYTHONINTERP_FOUND)
53
53
  "${ROUNDTRIP} ${CMAKE_CURRENT_BINARY_DIR}/../src/cmark"
54
54
  )
55
55
 
56
+ add_test(regressiontest_executable
57
+ ${PYTHON_EXECUTABLE}
58
+ "${CMAKE_CURRENT_SOURCE_DIR}/spec_tests.py" "--no-normalize" "--spec"
59
+ "${CMAKE_CURRENT_SOURCE_DIR}/regression.txt" "--program"
60
+ "${CMAKE_CURRENT_BINARY_DIR}/../src/cmark"
61
+ )
62
+
56
63
 
57
64
  ELSE(PYTHONINTERP_FOUND)
58
65
 
@@ -0,0 +1,34 @@
1
+ ### Regression tests
2
+
3
+ Issue #113: EOL character weirdness on Windows
4
+ (Important: first line ends with CR + CR + LF)
5
+
6
+ ```````````````````````````````` example
7
+ line1
8
+ line2
9
+ .
10
+ <p>line1</p>
11
+ <p>line2</p>
12
+ ````````````````````````````````
13
+
14
+ Issue #114: cmark skipping first character in line
15
+ (Important: the blank lines around "Repeatedly" contain a tab.)
16
+
17
+ ```````````````````````````````` example
18
+ By taking it apart
19
+
20
+ - alternative solutions
21
+
22
+ Repeatedly solving
23
+
24
+ - how techniques
25
+ .
26
+ <p>By taking it apart</p>
27
+ <ul>
28
+ <li>alternative solutions</li>
29
+ </ul>
30
+ <p>Repeatedly solving</p>
31
+ <ul>
32
+ <li>how techniques</li>
33
+ </ul>
34
+ ````````````````````````````````
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  title: CommonMark Spec
3
3
  author: John MacFarlane
4
- version: 0.24
5
- date: '2015-01-12'
4
+ version: 0.25
5
+ date: '2016-03-24'
6
6
  license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
7
7
  ...
8
8
 
@@ -301,15 +301,40 @@ by spaces with a tab stop of 4 characters.
301
301
  </ul>
302
302
  ````````````````````````````````
303
303
 
304
+ ```````````````````````````````` example
305
+ - foo
306
+
307
+ →→bar
308
+ .
309
+ <ul>
310
+ <li>
311
+ <p>foo</p>
312
+ <pre><code> bar
313
+ </code></pre>
314
+ </li>
315
+ </ul>
316
+ ````````````````````````````````
304
317
 
305
318
  ```````````````````````````````` example
306
- >→foo→bar
319
+ >→→foo
307
320
  .
308
321
  <blockquote>
309
- <p>foo→bar</p>
322
+ <pre><code> foo
323
+ </code></pre>
310
324
  </blockquote>
311
325
  ````````````````````````````````
312
326
 
327
+ ```````````````````````````````` example
328
+ -→→foo
329
+ .
330
+ <ul>
331
+ <li>
332
+ <pre><code> foo
333
+ </code></pre>
334
+ </li>
335
+ </ul>
336
+ ````````````````````````````````
337
+
313
338
 
314
339
  ```````````````````````````````` example
315
340
  foo
@@ -320,6 +345,24 @@ bar
320
345
  </code></pre>
321
346
  ````````````````````````````````
322
347
 
348
+ ```````````````````````````````` example
349
+ - foo
350
+ - bar
351
+ → - baz
352
+ .
353
+ <ul>
354
+ <li>foo
355
+ <ul>
356
+ <li>bar
357
+ <ul>
358
+ <li>baz</li>
359
+ </ul>
360
+ </li>
361
+ </ul>
362
+ </li>
363
+ </ul>
364
+ ````````````````````````````````
365
+
323
366
 
324
367
 
325
368
  ## Insecure characters
@@ -1204,7 +1247,7 @@ bar</p>
1204
1247
 
1205
1248
 
1206
1249
  or use a thematic break that cannot count as a [setext heading
1207
- line], such as
1250
+ underline], such as
1208
1251
 
1209
1252
  ```````````````````````````````` example
1210
1253
  Foo
@@ -8940,7 +8983,7 @@ This is text that can be incorporated into the last open
8940
8983
  block (a paragraph, code block, heading, or raw HTML).
8941
8984
 
8942
8985
  Setext headings are formed when we see a line of a paragraph
8943
- that is a setext heading line.
8986
+ that is a [setext heading underline].
8944
8987
 
8945
8988
  Reference link definitions are detected when a paragraph is closed;
8946
8989
  the accumulated text lines are parsed to see if they begin with
@@ -87,7 +87,7 @@ def get_tests(specfile):
87
87
 
88
88
  header_re = re.compile('#+ ')
89
89
 
90
- with open(specfile, 'r', encoding='utf-8') as specf:
90
+ with open(specfile, 'r', encoding='utf-8', newline='\n') as specf:
91
91
  for line in specf:
92
92
  line_number = line_number + 1
93
93
  l = line.strip()
@@ -0,0 +1,13 @@
1
+ @echo off
2
+
3
+ if "%MSVC_VERSION%" == "10" goto msvc10
4
+
5
+ call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" amd64
6
+ goto build
7
+
8
+ :msvc10
9
+ call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
10
+
11
+ :build
12
+ nmake
13
+
@@ -1,3 +1,3 @@
1
1
  module CommonMarker
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-20 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-enum
@@ -140,15 +140,15 @@ files:
140
140
  - ext/commonmarker/cmark/bench/stats.py
141
141
  - ext/commonmarker/cmark/benchmarks.md
142
142
  - ext/commonmarker/cmark/build/CMakeCache.txt
143
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeCCompiler.cmake
144
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake
145
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeDetermineCompilerABI_C.bin
146
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeDetermineCompilerABI_CXX.bin
147
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeSystem.cmake
148
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdC/CMakeCCompilerId.c
149
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdC/a.out
150
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
151
- - ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdCXX/a.out
143
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CMakeCCompiler.cmake
144
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake
145
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin
146
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin
147
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CMakeSystem.cmake
148
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c
149
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CompilerIdC/a.out
150
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp
151
+ - ext/commonmarker/cmark/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out
152
152
  - ext/commonmarker/cmark/build/CMakeFiles/CMakeDirectoryInformation.cmake
153
153
  - ext/commonmarker/cmark/build/CMakeFiles/CMakeError.log
154
154
  - ext/commonmarker/cmark/build/CMakeFiles/CMakeOutput.log
@@ -338,12 +338,14 @@ files:
338
338
  - ext/commonmarker/cmark/test/cmark.py
339
339
  - ext/commonmarker/cmark/test/normalize.py
340
340
  - ext/commonmarker/cmark/test/pathological_tests.py
341
+ - ext/commonmarker/cmark/test/regression.txt
341
342
  - ext/commonmarker/cmark/test/roundtrip.bat
342
343
  - ext/commonmarker/cmark/test/roundtrip.sh
343
344
  - ext/commonmarker/cmark/test/smart_punct.txt
344
345
  - ext/commonmarker/cmark/test/spec.txt
345
346
  - ext/commonmarker/cmark/test/spec_tests.py
346
347
  - ext/commonmarker/cmark/toolchain-mingw32.cmake
348
+ - ext/commonmarker/cmark/tools/appveyor-build.bat
347
349
  - ext/commonmarker/cmark/tools/make_entities_inc.py
348
350
  - ext/commonmarker/cmark/tools/mkcasefold.pl
349
351
  - ext/commonmarker/cmark/why-cmark-and-not-x.md