apex-ruby 1.0.37 → 1.0.38
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae9f539a2b1544d0df515de411fde4d0f3aeb30ab7ca7b6f479b11aebf7ffad9
|
|
4
|
+
data.tar.gz: cc8bbde52b5809eed92e053ba83f036ebd0165359f66b2948cda19d0302a49f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d249897d7cb049c2e2321d9eb611c7e7130b72c3a1d3eab7a9397b78d70de1c142cf149056ef15bb55ebe6748d1102f0e5cea56ce3343db7db0edac19848fc30
|
|
7
|
+
data.tar.gz: 5806b9b11104918b2f115f557cb032a339b03017375b08cb4ce15168ed0886837500b6aec2deedd2aaf15af45abfacf40cc5df93a7cabdbe2b8033c9b6579ac1
|
|
@@ -21,8 +21,8 @@ typedef struct cmark_node cmark_node;
|
|
|
21
21
|
|
|
22
22
|
#define APEX_VERSION_MAJOR 1
|
|
23
23
|
#define APEX_VERSION_MINOR 1
|
|
24
|
-
#define APEX_VERSION_PATCH
|
|
25
|
-
#define APEX_VERSION_STRING "1.1.
|
|
24
|
+
#define APEX_VERSION_PATCH 40
|
|
25
|
+
#define APEX_VERSION_STRING "1.1.40"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Processor compatibility modes
|
|
@@ -470,7 +470,9 @@ static void collect_nodes_with_attrs_recursive(cmark_node *node, attr_node **lis
|
|
|
470
470
|
/* Increment counter for this element type */
|
|
471
471
|
int elem_idx = -1;
|
|
472
472
|
if (type == CMARK_NODE_PARAGRAPH) elem_idx = counters->para_count++;
|
|
473
|
-
|
|
473
|
+
/* One node type for every heading level. HEADING+1..+5 are thematic
|
|
474
|
+
* breaks, footnotes, and the GFM table nodes, not h2-h6. */
|
|
475
|
+
else if (type == CMARK_NODE_HEADING) elem_idx = counters->heading_count++;
|
|
474
476
|
else if (type == CMARK_NODE_TABLE) {
|
|
475
477
|
/* For tables, increment the counter first, then use (count - 1) as the index */
|
|
476
478
|
/* This ensures the index matches the HTML renderer's count of <table> tags */
|
|
@@ -655,8 +657,7 @@ char *apex_render_html_with_attributes(cmark_node *document, int options) {
|
|
|
655
657
|
for (attr_node *a = attr_list; a; a = a->next, check_idx++) {
|
|
656
658
|
/* Check by element type and index for removal */
|
|
657
659
|
if (!used[check_idx] &&
|
|
658
|
-
|
|
659
|
-
(elem_type == CMARK_NODE_HEADING && a->node_type >= CMARK_NODE_HEADING && a->node_type <= CMARK_NODE_HEADING + 5)) &&
|
|
660
|
+
a->node_type == elem_type &&
|
|
660
661
|
a->element_index == elem_idx) {
|
|
661
662
|
if (strstr(a->attrs, "data-remove")) {
|
|
662
663
|
should_remove = true;
|
|
@@ -846,9 +847,7 @@ char *apex_render_html_with_attributes(cmark_node *document, int options) {
|
|
|
846
847
|
for (attr_node *a = attr_list; a; a = a->next, idx++) {
|
|
847
848
|
if (used[idx]) continue;
|
|
848
849
|
|
|
849
|
-
|
|
850
|
-
bool type_match = (a->node_type == elem_type ||
|
|
851
|
-
(elem_type == CMARK_NODE_HEADING && a->node_type >= CMARK_NODE_HEADING && a->node_type <= CMARK_NODE_HEADING + 5));
|
|
850
|
+
bool type_match = (a->node_type == elem_type);
|
|
852
851
|
|
|
853
852
|
if (!type_match) continue;
|
|
854
853
|
|
data/lib/apex/version.rb
CHANGED