apex-ruby 1.0.40 → 1.0.42
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: d4df60b99bfd0063dfd468268a2b99a820856158ab33592e0d6e1c7079e7a7df
|
|
4
|
+
data.tar.gz: cfb5ae10aa5b1fb839c1fff62f2447b2109e06ef0a04f322877ddfb66f60a545
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 073d0df457e0035ac85d57b70e98907dfcfbc8c935a5ffb06863ca3a0fff07e87fb15ea4e76e946c877f6213e18f4e78e0d50e75df3353451fa216cb651b6ae1
|
|
7
|
+
data.tar.gz: ae64955ab3a1572574454348f695790fd0f225d953c0165d1cd06712da4bd2791bdd50ca38c5c6d0c3a2da949a77c8b1d8e943f00bd9b7fe2e73b3de6ffcccb2
|
|
@@ -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 47
|
|
25
|
+
#define APEX_VERSION_STRING "1.1.47"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Processor compatibility modes
|
|
@@ -1222,9 +1222,16 @@ static bool process_span_ial_in_container(cmark_node *container, ald_entry *alds
|
|
|
1222
1222
|
bool has_preceding_content = (cmark_node_previous(child) != NULL) || (ial_start > text);
|
|
1223
1223
|
if (container_type == CMARK_NODE_PARAGRAPH && has_preceding_content) {
|
|
1224
1224
|
/* IAL was at end of text - apply to this paragraph (e.g. "Text\n{: .lead }" on one block).
|
|
1225
|
-
* Inside a blockquote, "> {: .class}" follows the paragraph, so the class stays on that paragraph.
|
|
1225
|
+
* Inside a blockquote, "> {: .class}" follows the paragraph, so the class stays on that paragraph.
|
|
1226
|
+
* On the list marker line, the IAL belongs to the item. A later paragraph inside the item keeps its own class. */
|
|
1227
|
+
cmark_node *attr_node = container;
|
|
1228
|
+
cmark_node *parent = cmark_node_parent(container);
|
|
1229
|
+
if (parent && cmark_node_get_type(parent) == CMARK_NODE_ITEM &&
|
|
1230
|
+
cmark_node_first_child(parent) == container) {
|
|
1231
|
+
attr_node = parent;
|
|
1232
|
+
}
|
|
1226
1233
|
char *attr_str = attributes_to_html(attrs);
|
|
1227
|
-
cmark_node_set_user_data(
|
|
1234
|
+
cmark_node_set_user_data(attr_node, attr_str);
|
|
1228
1235
|
apex_free_attributes(attrs);
|
|
1229
1236
|
|
|
1230
1237
|
/* Remove the IAL from the text node */
|
|
@@ -205,7 +205,6 @@ static cmark_node *match_math_dollar(cmark_syntax_extension *self,
|
|
|
205
205
|
/**
|
|
206
206
|
* Match function for \ character (LaTeX style)
|
|
207
207
|
*/
|
|
208
|
-
__attribute__((unused))
|
|
209
208
|
static cmark_node *match_math_backslash(cmark_syntax_extension *self,
|
|
210
209
|
cmark_parser *parser,
|
|
211
210
|
cmark_node *parent,
|
|
@@ -267,6 +266,21 @@ static cmark_node *match_math_backslash(cmark_syntax_extension *self,
|
|
|
267
266
|
return node;
|
|
268
267
|
}
|
|
269
268
|
|
|
269
|
+
/* One match callback handles both $...$ and \(...\) / \[...\]. */
|
|
270
|
+
static cmark_node *match_math(cmark_syntax_extension *self,
|
|
271
|
+
cmark_parser *parser,
|
|
272
|
+
cmark_node *parent,
|
|
273
|
+
unsigned char character,
|
|
274
|
+
cmark_inline_parser *inline_parser) {
|
|
275
|
+
if (character == '$') {
|
|
276
|
+
return match_math_dollar(self, parser, parent, character, inline_parser);
|
|
277
|
+
}
|
|
278
|
+
if (character == '\\') {
|
|
279
|
+
return match_math_backslash(self, parser, parent, character, inline_parser);
|
|
280
|
+
}
|
|
281
|
+
return NULL;
|
|
282
|
+
}
|
|
283
|
+
|
|
270
284
|
/**
|
|
271
285
|
* Create the math extension
|
|
272
286
|
*/
|
|
@@ -280,8 +294,7 @@ cmark_syntax_extension *create_math_extension(void) {
|
|
|
280
294
|
special_chars = cmark_llist_append(mem, special_chars, (void *)'\\');
|
|
281
295
|
cmark_syntax_extension_set_special_inline_chars(ext, special_chars);
|
|
282
296
|
|
|
283
|
-
|
|
284
|
-
cmark_syntax_extension_set_match_inline_func(ext, match_math_dollar);
|
|
297
|
+
cmark_syntax_extension_set_match_inline_func(ext, match_math);
|
|
285
298
|
|
|
286
299
|
return ext;
|
|
287
300
|
}
|
data/lib/apex/version.rb
CHANGED