apex-ruby 1.0.41 → 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: e6a2086248dff794040d84d718d1d68309370ba7e7c45fe49d4b2fcb1fc81754
4
- data.tar.gz: 7810a4e7ff7eab5ef22ad8bc0c95ba5a22daeede9257f8ccd74bf27a51863bbc
3
+ metadata.gz: d4df60b99bfd0063dfd468268a2b99a820856158ab33592e0d6e1c7079e7a7df
4
+ data.tar.gz: cfb5ae10aa5b1fb839c1fff62f2447b2109e06ef0a04f322877ddfb66f60a545
5
5
  SHA512:
6
- metadata.gz: 045ccea76529a5a5309049c5ca786a84927c573e5a69b9c24b230f4cf62868b4327a2fc3dd7123ee6d7410bc767e820a3265b3eb425a1fe00d5816c7cf8073d6
7
- data.tar.gz: 1a573a1fe4be54962bfd8841742f86d74ed4271aab401420d17cbc7d8f0cc9f82af7211535be030786704bde6bce419ba3b00bcd93900a4838bf0a37e07ca493
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 46
25
- #define APEX_VERSION_STRING "1.1.46"
24
+ #define APEX_VERSION_PATCH 47
25
+ #define APEX_VERSION_STRING "1.1.47"
26
26
 
27
27
  /**
28
28
  * Processor compatibility modes
@@ -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
- /* Set match function - it will handle both $ and \ */
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
@@ -6,7 +6,7 @@ module Apex
6
6
  # via Apex::Native.version.
7
7
  module Version
8
8
  # Current gem version.
9
- VERSION = "1.0.41"
9
+ VERSION = "1.0.42"
10
10
  end
11
11
 
12
12
  # Shortcut to gem version string.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apex-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.41
4
+ version: 1.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra