commonmarker 0.17.7.1 → 0.18.0

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -17
  3. data/commonmarker.gemspec +1 -1
  4. data/ext/commonmarker/arena.c +2 -2
  5. data/ext/commonmarker/autolink.h +3 -3
  6. data/ext/commonmarker/blocks.c +21 -15
  7. data/ext/commonmarker/buffer.h +23 -23
  8. data/ext/commonmarker/chunk.h +1 -1
  9. data/ext/commonmarker/cmark-gfm-core-extensions.h +28 -0
  10. data/ext/commonmarker/{cmark_extension_api.h → cmark-gfm-extension_api.h} +86 -69
  11. data/ext/commonmarker/cmark-gfm-extensions_export.h +42 -0
  12. data/ext/commonmarker/{cmark.h → cmark-gfm.h} +118 -96
  13. data/ext/commonmarker/cmark-gfm_export.h +42 -0
  14. data/ext/commonmarker/cmark-gfm_version.h +7 -0
  15. data/ext/commonmarker/cmark.c +3 -3
  16. data/ext/commonmarker/cmark_ctype.h +6 -6
  17. data/ext/commonmarker/commonmark.c +8 -4
  18. data/ext/commonmarker/commonmarker.c +33 -15
  19. data/ext/commonmarker/commonmarker.h +1 -1
  20. data/ext/commonmarker/core-extensions.c +2 -2
  21. data/ext/commonmarker/ext_scanners.h +1 -1
  22. data/ext/commonmarker/footnotes.c +1 -1
  23. data/ext/commonmarker/houdini.h +6 -6
  24. data/ext/commonmarker/houdini_href_e.c +2 -2
  25. data/ext/commonmarker/html.c +15 -7
  26. data/ext/commonmarker/inlines.c +36 -5
  27. data/ext/commonmarker/inlines.h +1 -1
  28. data/ext/commonmarker/iterator.c +1 -1
  29. data/ext/commonmarker/iterator.h +1 -1
  30. data/ext/commonmarker/latex.c +1 -1
  31. data/ext/commonmarker/linked_list.c +1 -1
  32. data/ext/commonmarker/man.c +1 -1
  33. data/ext/commonmarker/node.c +17 -3
  34. data/ext/commonmarker/node.h +4 -4
  35. data/ext/commonmarker/plugin.h +2 -2
  36. data/ext/commonmarker/references.c +1 -1
  37. data/ext/commonmarker/registry.c +1 -1
  38. data/ext/commonmarker/registry.h +4 -4
  39. data/ext/commonmarker/render.c +1 -1
  40. data/ext/commonmarker/scanners.c +10550 -18051
  41. data/ext/commonmarker/scanners.h +1 -1
  42. data/ext/commonmarker/strikethrough.c +13 -3
  43. data/ext/commonmarker/strikethrough.h +3 -3
  44. data/ext/commonmarker/syntax_extension.c +11 -1
  45. data/ext/commonmarker/syntax_extension.h +4 -2
  46. data/ext/commonmarker/table.c +88 -9
  47. data/ext/commonmarker/table.h +7 -3
  48. data/ext/commonmarker/tagfilter.h +3 -3
  49. data/ext/commonmarker/utf8.h +6 -6
  50. data/ext/commonmarker/xml.c +10 -3
  51. data/lib/commonmarker/config.rb +4 -1
  52. data/lib/commonmarker/node.rb +6 -4
  53. data/lib/commonmarker/renderer/html_renderer.rb +12 -12
  54. data/lib/commonmarker/version.rb +1 -1
  55. data/test/test_extensions.rb +52 -1
  56. data/test/test_footnotes.rb +1 -1
  57. data/test/test_options.rb +35 -0
  58. data/test/test_spec.rb +4 -4
  59. metadata +12 -10
  60. data/ext/commonmarker/cmark_export.h +0 -42
  61. data/ext/commonmarker/cmark_version.h +0 -8
  62. data/ext/commonmarker/cmarkextensions_export.h +0 -42
  63. data/ext/commonmarker/core-extensions.h +0 -25
@@ -1,11 +1,11 @@
1
- #ifndef CMARK_CMARK_EXTENSION_API_H
2
- #define CMARK_CMARK_EXTENSION_API_H
1
+ #ifndef CMARK_GFM_EXTENSION_API_H
2
+ #define CMARK_GFM_EXTENSION_API_H
3
3
 
4
4
  #ifdef __cplusplus
5
5
  extern "C" {
6
6
  #endif
7
7
 
8
- #include <cmark.h>
8
+ #include "cmark-gfm.h"
9
9
 
10
10
  struct cmark_renderer;
11
11
  struct cmark_html_renderer;
@@ -106,8 +106,6 @@ typedef struct cmark_plugin cmark_plugin;
106
106
  * with 'cmark_syntax_extension_set_private',
107
107
  * and optionally define a free function for this data.
108
108
  */
109
- typedef struct cmark_syntax_extension cmark_syntax_extension;
110
-
111
109
  typedef struct subject cmark_inline_parser;
112
110
 
113
111
  /** Exposed raw for now */
@@ -170,7 +168,7 @@ typedef int (*cmark_plugin_init_func)(cmark_plugin *plugin);
170
168
  * This takes ownership of 'extension', one should not call
171
169
  * 'cmark_syntax_extension_free' on a registered extension.
172
170
  */
173
- CMARK_EXPORT
171
+ CMARK_GFM_EXPORT
174
172
  int cmark_plugin_register_syntax_extension(cmark_plugin *plugin,
175
173
  cmark_syntax_extension *extension);
176
174
 
@@ -180,7 +178,7 @@ int cmark_plugin_register_syntax_extension(cmark_plugin *plugin,
180
178
  * It can then be attached to a cmark_parser
181
179
  * with the cmark_parser_attach_syntax_extension method.
182
180
  */
183
- CMARK_EXPORT
181
+ CMARK_GFM_EXPORT
184
182
  cmark_syntax_extension *cmark_find_syntax_extension(const char *name);
185
183
 
186
184
  /** Should create and add a new open block to 'parent_container' if
@@ -238,6 +236,9 @@ typedef int (*cmark_commonmark_escape_func) (cmark_syntax_extension *extension,
238
236
  cmark_node *node,
239
237
  int c);
240
238
 
239
+ typedef const char* (*cmark_xml_attr_func) (cmark_syntax_extension *extension,
240
+ cmark_node *node);
241
+
241
242
  typedef void (*cmark_html_render_func) (cmark_syntax_extension *extension,
242
243
  struct cmark_html_renderer *renderer,
243
244
  cmark_node *node,
@@ -254,149 +255,165 @@ typedef cmark_node *(*cmark_postprocess_func) (cmark_syntax_extension *extension
254
255
 
255
256
  typedef int (*cmark_ispunct_func) (char c);
256
257
 
258
+ typedef void (*cmark_opaque_alloc_func) (cmark_syntax_extension *extension,
259
+ cmark_mem *mem,
260
+ cmark_node *node);
261
+
257
262
  typedef void (*cmark_opaque_free_func) (cmark_syntax_extension *extension,
258
263
  cmark_mem *mem,
259
264
  cmark_node *node);
260
265
 
261
266
  /** Free a cmark_syntax_extension.
262
267
  */
263
- CMARK_EXPORT
268
+ CMARK_GFM_EXPORT
264
269
  void cmark_syntax_extension_free (cmark_mem *mem, cmark_syntax_extension *extension);
265
270
 
266
271
  /** Return a newly-constructed cmark_syntax_extension, named 'name'.
267
272
  */
268
- CMARK_EXPORT
273
+ CMARK_GFM_EXPORT
269
274
  cmark_syntax_extension *cmark_syntax_extension_new (const char *name);
270
275
 
271
- CMARK_EXPORT
276
+ CMARK_GFM_EXPORT
272
277
  cmark_node_type cmark_syntax_extension_add_node(int is_inline);
273
278
 
274
- CMARK_EXPORT
279
+ CMARK_GFM_EXPORT
275
280
  void cmark_syntax_extension_set_emphasis(cmark_syntax_extension *extension, int emphasis);
276
281
 
277
282
  /** See the documentation for 'cmark_syntax_extension'
278
283
  */
279
- CMARK_EXPORT
284
+ CMARK_GFM_EXPORT
280
285
  void cmark_syntax_extension_set_open_block_func(cmark_syntax_extension *extension,
281
286
  cmark_open_block_func func);
282
287
 
283
288
  /** See the documentation for 'cmark_syntax_extension'
284
289
  */
285
- CMARK_EXPORT
290
+ CMARK_GFM_EXPORT
286
291
  void cmark_syntax_extension_set_match_block_func(cmark_syntax_extension *extension,
287
292
  cmark_match_block_func func);
288
293
 
289
294
  /** See the documentation for 'cmark_syntax_extension'
290
295
  */
291
- CMARK_EXPORT
296
+ CMARK_GFM_EXPORT
292
297
  void cmark_syntax_extension_set_match_inline_func(cmark_syntax_extension *extension,
293
298
  cmark_match_inline_func func);
294
299
 
295
300
  /** See the documentation for 'cmark_syntax_extension'
296
301
  */
297
- CMARK_EXPORT
302
+ CMARK_GFM_EXPORT
298
303
  void cmark_syntax_extension_set_inline_from_delim_func(cmark_syntax_extension *extension,
299
304
  cmark_inline_from_delim_func func);
300
305
 
301
306
  /** See the documentation for 'cmark_syntax_extension'
302
307
  */
303
- CMARK_EXPORT
308
+ CMARK_GFM_EXPORT
304
309
  void cmark_syntax_extension_set_special_inline_chars(cmark_syntax_extension *extension,
305
310
  cmark_llist *special_chars);
306
311
 
307
312
  /** See the documentation for 'cmark_syntax_extension'
308
313
  */
309
- CMARK_EXPORT
314
+ CMARK_GFM_EXPORT
310
315
  void cmark_syntax_extension_set_get_type_string_func(cmark_syntax_extension *extension,
311
316
  cmark_get_type_string_func func);
312
317
 
313
318
  /** See the documentation for 'cmark_syntax_extension'
314
319
  */
315
- CMARK_EXPORT
320
+ CMARK_GFM_EXPORT
316
321
  void cmark_syntax_extension_set_can_contain_func(cmark_syntax_extension *extension,
317
322
  cmark_can_contain_func func);
318
323
 
319
324
  /** See the documentation for 'cmark_syntax_extension'
320
325
  */
321
- CMARK_EXPORT
326
+ CMARK_GFM_EXPORT
322
327
  void cmark_syntax_extension_set_contains_inlines_func(cmark_syntax_extension *extension,
323
328
  cmark_contains_inlines_func func);
324
329
 
325
330
  /** See the documentation for 'cmark_syntax_extension'
326
331
  */
327
- CMARK_EXPORT
332
+ CMARK_GFM_EXPORT
328
333
  void cmark_syntax_extension_set_commonmark_render_func(cmark_syntax_extension *extension,
329
334
  cmark_common_render_func func);
330
335
 
331
336
  /** See the documentation for 'cmark_syntax_extension'
332
337
  */
333
- CMARK_EXPORT
338
+ CMARK_GFM_EXPORT
334
339
  void cmark_syntax_extension_set_plaintext_render_func(cmark_syntax_extension *extension,
335
340
  cmark_common_render_func func);
336
341
 
337
342
  /** See the documentation for 'cmark_syntax_extension'
338
343
  */
339
- CMARK_EXPORT
344
+ CMARK_GFM_EXPORT
340
345
  void cmark_syntax_extension_set_latex_render_func(cmark_syntax_extension *extension,
341
346
  cmark_common_render_func func);
342
347
 
343
348
  /** See the documentation for 'cmark_syntax_extension'
344
349
  */
345
- CMARK_EXPORT
350
+ CMARK_GFM_EXPORT
351
+ void cmark_syntax_extension_set_xml_attr_func(cmark_syntax_extension *extension,
352
+ cmark_xml_attr_func func);
353
+
354
+ /** See the documentation for 'cmark_syntax_extension'
355
+ */
356
+ CMARK_GFM_EXPORT
346
357
  void cmark_syntax_extension_set_man_render_func(cmark_syntax_extension *extension,
347
358
  cmark_common_render_func func);
348
359
 
349
360
  /** See the documentation for 'cmark_syntax_extension'
350
361
  */
351
- CMARK_EXPORT
362
+ CMARK_GFM_EXPORT
352
363
  void cmark_syntax_extension_set_html_render_func(cmark_syntax_extension *extension,
353
364
  cmark_html_render_func func);
354
365
 
355
366
  /** See the documentation for 'cmark_syntax_extension'
356
367
  */
357
- CMARK_EXPORT
368
+ CMARK_GFM_EXPORT
358
369
  void cmark_syntax_extension_set_html_filter_func(cmark_syntax_extension *extension,
359
370
  cmark_html_filter_func func);
360
371
 
361
372
  /** See the documentation for 'cmark_syntax_extension'
362
373
  */
363
- CMARK_EXPORT
374
+ CMARK_GFM_EXPORT
364
375
  void cmark_syntax_extension_set_commonmark_escape_func(cmark_syntax_extension *extension,
365
376
  cmark_commonmark_escape_func func);
366
377
 
367
378
  /** See the documentation for 'cmark_syntax_extension'
368
379
  */
369
- CMARK_EXPORT
380
+ CMARK_GFM_EXPORT
370
381
  void cmark_syntax_extension_set_private(cmark_syntax_extension *extension,
371
382
  void *priv,
372
383
  cmark_free_func free_func);
373
384
 
374
385
  /** See the documentation for 'cmark_syntax_extension'
375
386
  */
376
- CMARK_EXPORT
387
+ CMARK_GFM_EXPORT
377
388
  void *cmark_syntax_extension_get_private(cmark_syntax_extension *extension);
378
389
 
379
390
  /** See the documentation for 'cmark_syntax_extension'
380
391
  */
381
- CMARK_EXPORT
392
+ CMARK_GFM_EXPORT
382
393
  void cmark_syntax_extension_set_postprocess_func(cmark_syntax_extension *extension,
383
394
  cmark_postprocess_func func);
384
395
 
385
396
  /** See the documentation for 'cmark_syntax_extension'
386
397
  */
387
- CMARK_EXPORT
398
+ CMARK_GFM_EXPORT
399
+ void cmark_syntax_extension_set_opaque_alloc_func(cmark_syntax_extension *extension,
400
+ cmark_opaque_alloc_func func);
401
+
402
+ /** See the documentation for 'cmark_syntax_extension'
403
+ */
404
+ CMARK_GFM_EXPORT
388
405
  void cmark_syntax_extension_set_opaque_free_func(cmark_syntax_extension *extension,
389
406
  cmark_opaque_free_func func);
390
407
 
391
408
  /** See the documentation for 'cmark_syntax_extension'
392
409
  */
393
- CMARK_EXPORT
410
+ CMARK_GFM_EXPORT
394
411
  void cmark_parser_set_backslash_ispunct_func(cmark_parser *parser,
395
412
  cmark_ispunct_func func);
396
413
 
397
414
  /** Return the index of the line currently being parsed, starting with 1.
398
415
  */
399
- CMARK_EXPORT
416
+ CMARK_GFM_EXPORT
400
417
  int cmark_parser_get_line_number(cmark_parser *parser);
401
418
 
402
419
  /** Return the offset in bytes in the line being processed.
@@ -407,7 +424,7 @@ int cmark_parser_get_line_number(cmark_parser *parser);
407
424
  *
408
425
  * Here, offset will first be 0, then 5 (the index of the 'f' character).
409
426
  */
410
- CMARK_EXPORT
427
+ CMARK_GFM_EXPORT
411
428
  int cmark_parser_get_offset(cmark_parser *parser);
412
429
 
413
430
  /**
@@ -441,7 +458,7 @@ int cmark_parser_get_offset(cmark_parser *parser);
441
458
  * cmark_parser_has_partially_consumed_tab() will now return
442
459
  * 'true'.
443
460
  */
444
- CMARK_EXPORT
461
+ CMARK_GFM_EXPORT
445
462
  int cmark_parser_get_column(cmark_parser *parser);
446
463
 
447
464
  /** Return the absolute index in bytes of the first nonspace
@@ -456,7 +473,7 @@ int cmark_parser_get_column(cmark_parser *parser);
456
473
  * 0 offset (16) first_nonspace (28)
457
474
  * ```
458
475
  */
459
- CMARK_EXPORT
476
+ CMARK_GFM_EXPORT
460
477
  int cmark_parser_get_first_nonspace(cmark_parser *parser);
461
478
 
462
479
  /** Return the absolute index of the first nonspace column coming after 'offset'
@@ -466,7 +483,7 @@ int cmark_parser_get_first_nonspace(cmark_parser *parser);
466
483
  * See the documentation for cmark_parser_get_first_nonspace() and
467
484
  * cmark_parser_get_column() for more information.
468
485
  */
469
- CMARK_EXPORT
486
+ CMARK_GFM_EXPORT
470
487
  int cmark_parser_get_first_nonspace_column(cmark_parser *parser);
471
488
 
472
489
  /** Return the difference between the values returned by
@@ -476,7 +493,7 @@ int cmark_parser_get_first_nonspace_column(cmark_parser *parser);
476
493
  * This is not a byte offset, as it can count one tab as multiple
477
494
  * characters.
478
495
  */
479
- CMARK_EXPORT
496
+ CMARK_GFM_EXPORT
480
497
  int cmark_parser_get_indent(cmark_parser *parser);
481
498
 
482
499
  /** Return 'true' if the line currently being processed has been entirely
@@ -507,7 +524,7 @@ int cmark_parser_get_indent(cmark_parser *parser);
507
524
  *
508
525
  * At this point, this function will now return 'true'.
509
526
  */
510
- CMARK_EXPORT
527
+ CMARK_GFM_EXPORT
511
528
  int cmark_parser_is_blank(cmark_parser *parser);
512
529
 
513
530
  /** Return 'true' if the value returned by cmark_parser_get_offset()
@@ -516,13 +533,13 @@ int cmark_parser_is_blank(cmark_parser *parser);
516
533
  * See the documentation for cmark_parser_get_column() for more
517
534
  * information.
518
535
  */
519
- CMARK_EXPORT
536
+ CMARK_GFM_EXPORT
520
537
  int cmark_parser_has_partially_consumed_tab(cmark_parser *parser);
521
538
 
522
539
  /** Return the length in bytes of the previously processed line, excluding potential
523
540
  * newline (\n) and carriage return (\r) trailing characters.
524
541
  */
525
- CMARK_EXPORT
542
+ CMARK_GFM_EXPORT
526
543
  int cmark_parser_get_last_line_length(cmark_parser *parser);
527
544
 
528
545
  /** Add a child to 'parent' during the parsing process.
@@ -531,7 +548,7 @@ int cmark_parser_get_last_line_length(cmark_parser *parser);
531
548
  * this function will back up till it hits a node that can, closing
532
549
  * blocks as appropriate.
533
550
  */
534
- CMARK_EXPORT
551
+ CMARK_GFM_EXPORT
535
552
  cmark_node*cmark_parser_add_child(cmark_parser *parser,
536
553
  cmark_node *parent,
537
554
  cmark_node_type block_type,
@@ -542,14 +559,14 @@ cmark_node*cmark_parser_add_child(cmark_parser *parser,
542
559
  * See the documentation of cmark_parser_get_offset() and
543
560
  * cmark_parser_get_column() for more information.
544
561
  */
545
- CMARK_EXPORT
562
+ CMARK_GFM_EXPORT
546
563
  void cmark_parser_advance_offset(cmark_parser *parser,
547
564
  const char *input,
548
565
  int count,
549
566
  int columns);
550
567
 
551
568
 
552
- CMARK_EXPORT
569
+ CMARK_GFM_EXPORT
553
570
  void cmark_parser_feed_reentrant(cmark_parser *parser, const char *buffer, size_t len);
554
571
 
555
572
  /** Attach the syntax 'extension' to the 'parser', to provide extra syntax
@@ -559,33 +576,33 @@ void cmark_parser_feed_reentrant(cmark_parser *parser, const char *buffer, size_
559
576
  * Returns 'true' if the 'extension' was successfully attached,
560
577
  * 'false' otherwise.
561
578
  */
562
- CMARK_EXPORT
579
+ CMARK_GFM_EXPORT
563
580
  int cmark_parser_attach_syntax_extension(cmark_parser *parser, cmark_syntax_extension *extension);
564
581
 
565
582
  /** Change the type of 'node'.
566
583
  *
567
584
  * Return 0 if the type could be changed, 1 otherwise.
568
585
  */
569
- CMARK_EXPORT int cmark_node_set_type(cmark_node *node, cmark_node_type type);
586
+ CMARK_GFM_EXPORT int cmark_node_set_type(cmark_node *node, cmark_node_type type);
570
587
 
571
588
  /** Return the string content for all types of 'node'.
572
589
  * The pointer stays valid as long as 'node' isn't freed.
573
590
  */
574
- CMARK_EXPORT const char *cmark_node_get_string_content(cmark_node *node);
591
+ CMARK_GFM_EXPORT const char *cmark_node_get_string_content(cmark_node *node);
575
592
 
576
593
  /** Set the string 'content' for all types of 'node'.
577
594
  * Copies 'content'.
578
595
  */
579
- CMARK_EXPORT int cmark_node_set_string_content(cmark_node *node, const char *content);
596
+ CMARK_GFM_EXPORT int cmark_node_set_string_content(cmark_node *node, const char *content);
580
597
 
581
598
  /** Get the syntax extension responsible for the creation of 'node'.
582
599
  * Return NULL if 'node' was created because it matched standard syntax rules.
583
600
  */
584
- CMARK_EXPORT cmark_syntax_extension *cmark_node_get_syntax_extension(cmark_node *node);
601
+ CMARK_GFM_EXPORT cmark_syntax_extension *cmark_node_get_syntax_extension(cmark_node *node);
585
602
 
586
603
  /** Set the syntax extension responsible for creating 'node'.
587
604
  */
588
- CMARK_EXPORT int cmark_node_set_syntax_extension(cmark_node *node,
605
+ CMARK_GFM_EXPORT int cmark_node_set_syntax_extension(cmark_node *node,
589
606
  cmark_syntax_extension *extension);
590
607
 
591
608
  /**
@@ -600,63 +617,63 @@ CMARK_EXPORT int cmark_node_set_syntax_extension(cmark_node *node,
600
617
  typedef int (*cmark_inline_predicate)(int c);
601
618
 
602
619
  /** Advance the current inline parsing offset */
603
- CMARK_EXPORT
620
+ CMARK_GFM_EXPORT
604
621
  void cmark_inline_parser_advance_offset(cmark_inline_parser *parser);
605
622
 
606
623
  /** Get the current inline parsing offset */
607
- CMARK_EXPORT
624
+ CMARK_GFM_EXPORT
608
625
  int cmark_inline_parser_get_offset(cmark_inline_parser *parser);
609
626
 
610
627
  /** Set the offset in bytes in the chunk being processed by the given inline parser.
611
628
  */
612
- CMARK_EXPORT
629
+ CMARK_GFM_EXPORT
613
630
  void cmark_inline_parser_set_offset(cmark_inline_parser *parser, int offset);
614
631
 
615
632
  /** Gets the cmark_chunk being operated on by the given inline parser.
616
633
  * Use cmark_inline_parser_get_offset to get our current position in the chunk.
617
634
  */
618
- CMARK_EXPORT
635
+ CMARK_GFM_EXPORT
619
636
  struct cmark_chunk *cmark_inline_parser_get_chunk(cmark_inline_parser *parser);
620
637
 
621
638
  /** Returns 1 if the inline parser is currently in a bracket; pass 1 for 'image'
622
639
  * if you want to know about an image-type bracket, 0 for link-type. */
623
- CMARK_EXPORT
640
+ CMARK_GFM_EXPORT
624
641
  int cmark_inline_parser_in_bracket(cmark_inline_parser *parser, int image);
625
642
 
626
643
  /** Remove the last n characters from the last child of the given node.
627
644
  * This only works where all n characters are in the single last child, and the last
628
645
  * child is CMARK_NODE_TEXT.
629
646
  */
630
- CMARK_EXPORT
647
+ CMARK_GFM_EXPORT
631
648
  void cmark_node_unput(cmark_node *node, int n);
632
649
 
633
650
 
634
651
  /** Get the character located at the current inline parsing offset
635
652
  */
636
- CMARK_EXPORT
653
+ CMARK_GFM_EXPORT
637
654
  unsigned char cmark_inline_parser_peek_char(cmark_inline_parser *parser);
638
655
 
639
656
  /** Get the character located 'pos' bytes in the current line.
640
657
  */
641
- CMARK_EXPORT
658
+ CMARK_GFM_EXPORT
642
659
  unsigned char cmark_inline_parser_peek_at(cmark_inline_parser *parser, int pos);
643
660
 
644
661
  /** Whether the inline parser has reached the end of the current line
645
662
  */
646
- CMARK_EXPORT
663
+ CMARK_GFM_EXPORT
647
664
  int cmark_inline_parser_is_eof(cmark_inline_parser *parser);
648
665
 
649
666
  /** Get the characters located after the current inline parsing offset
650
667
  * while 'pred' matches. Free after usage.
651
668
  */
652
- CMARK_EXPORT
669
+ CMARK_GFM_EXPORT
653
670
  char *cmark_inline_parser_take_while(cmark_inline_parser *parser, cmark_inline_predicate pred);
654
671
 
655
672
  /** Push a delimiter on the delimiter stack.
656
673
  * See <<http://spec.commonmark.org/0.24/#phase-2-inline-structure> for
657
674
  * more information on the parameters
658
675
  */
659
- CMARK_EXPORT
676
+ CMARK_GFM_EXPORT
660
677
  void cmark_inline_parser_push_delimiter(cmark_inline_parser *parser,
661
678
  unsigned char c,
662
679
  int can_open,
@@ -665,16 +682,16 @@ void cmark_inline_parser_push_delimiter(cmark_inline_parser *parser,
665
682
 
666
683
  /** Remove 'delim' from the delimiter stack
667
684
  */
668
- CMARK_EXPORT
685
+ CMARK_GFM_EXPORT
669
686
  void cmark_inline_parser_remove_delimiter(cmark_inline_parser *parser, delimiter *delim);
670
687
 
671
- CMARK_EXPORT
688
+ CMARK_GFM_EXPORT
672
689
  delimiter *cmark_inline_parser_get_last_delimiter(cmark_inline_parser *parser);
673
690
 
674
- CMARK_EXPORT
691
+ CMARK_GFM_EXPORT
675
692
  int cmark_inline_parser_get_line(cmark_inline_parser *parser);
676
693
 
677
- CMARK_EXPORT
694
+ CMARK_GFM_EXPORT
678
695
  int cmark_inline_parser_get_column(cmark_inline_parser *parser);
679
696
 
680
697
  /** Convenience function to scan a given delimiter.
@@ -691,7 +708,7 @@ int cmark_inline_parser_get_column(cmark_inline_parser *parser);
691
708
  * Returns the number of delimiters encountered, in the limit
692
709
  * of 'max_delims', and advances the inline parsing offset.
693
710
  */
694
- CMARK_EXPORT
711
+ CMARK_GFM_EXPORT
695
712
  int cmark_inline_parser_scan_delimiters(cmark_inline_parser *parser,
696
713
  int max_delims,
697
714
  unsigned char c,
@@ -700,16 +717,16 @@ int cmark_inline_parser_scan_delimiters(cmark_inline_parser *parser,
700
717
  int *punct_before,
701
718
  int *punct_after);
702
719
 
703
- CMARK_EXPORT
720
+ CMARK_GFM_EXPORT
704
721
  void cmark_manage_extensions_special_characters(cmark_parser *parser, int add);
705
722
 
706
- CMARK_EXPORT
723
+ CMARK_GFM_EXPORT
707
724
  cmark_llist *cmark_parser_get_syntax_extensions(cmark_parser *parser);
708
725
 
709
- CMARK_EXPORT
726
+ CMARK_GFM_EXPORT
710
727
  void cmark_arena_push(void);
711
728
 
712
- CMARK_EXPORT
729
+ CMARK_GFM_EXPORT
713
730
  int cmark_arena_pop(void);
714
731
 
715
732
  #ifdef __cplusplus
@@ -0,0 +1,42 @@
1
+
2
+ #ifndef CMARK_GFM_EXTENSIONS_EXPORT_H
3
+ #define CMARK_GFM_EXTENSIONS_EXPORT_H
4
+
5
+ #ifdef CMARK_GFM_EXTENSIONS_STATIC_DEFINE
6
+ # define CMARK_GFM_EXTENSIONS_EXPORT
7
+ # define CMARK_GFM_EXTENSIONS_NO_EXPORT
8
+ #else
9
+ # ifndef CMARK_GFM_EXTENSIONS_EXPORT
10
+ # ifdef libcmark_gfm_extensions_EXPORTS
11
+ /* We are building this library */
12
+ # define CMARK_GFM_EXTENSIONS_EXPORT __attribute__((visibility("default")))
13
+ # else
14
+ /* We are using this library */
15
+ # define CMARK_GFM_EXTENSIONS_EXPORT __attribute__((visibility("default")))
16
+ # endif
17
+ # endif
18
+
19
+ # ifndef CMARK_GFM_EXTENSIONS_NO_EXPORT
20
+ # define CMARK_GFM_EXTENSIONS_NO_EXPORT __attribute__((visibility("hidden")))
21
+ # endif
22
+ #endif
23
+
24
+ #ifndef CMARK_GFM_EXTENSIONS_DEPRECATED
25
+ # define CMARK_GFM_EXTENSIONS_DEPRECATED __attribute__ ((__deprecated__))
26
+ #endif
27
+
28
+ #ifndef CMARK_GFM_EXTENSIONS_DEPRECATED_EXPORT
29
+ # define CMARK_GFM_EXTENSIONS_DEPRECATED_EXPORT CMARK_GFM_EXTENSIONS_EXPORT CMARK_GFM_EXTENSIONS_DEPRECATED
30
+ #endif
31
+
32
+ #ifndef CMARK_GFM_EXTENSIONS_DEPRECATED_NO_EXPORT
33
+ # define CMARK_GFM_EXTENSIONS_DEPRECATED_NO_EXPORT CMARK_GFM_EXTENSIONS_NO_EXPORT CMARK_GFM_EXTENSIONS_DEPRECATED
34
+ #endif
35
+
36
+ #if 0 /* DEFINE_NO_DEPRECATED */
37
+ # ifndef CMARK_GFM_EXTENSIONS_NO_DEPRECATED
38
+ # define CMARK_GFM_EXTENSIONS_NO_DEPRECATED
39
+ # endif
40
+ #endif
41
+
42
+ #endif /* CMARK_GFM_EXTENSIONS_EXPORT_H */