apex-ruby 1.0.47 → 1.0.48

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: 4bd56294a5d4efab3a7dcbe88da7fbe6a51df8a88cfaa3dfd6802a7f1d1971f1
4
- data.tar.gz: e3b751eb49ba9a49876f69c4eea8df8f16ec909dbf07b824f024644523fe3595
3
+ metadata.gz: af47746d54e1eddfa5d3cd6fb40cf85b5bf5ab1062d3e622ab09e51fdfb41b95
4
+ data.tar.gz: 363eac1631346ec02e9a9e59e9f8bcc7ea3fc1f1f0fc43a24331cb0833e4166d
5
5
  SHA512:
6
- metadata.gz: b314a0984fc6fb02217466cc60acb2d2b99323634a2f09e4c00606938181eaa7657c1116ff4e0830e0e34a4bbe7366a036a30d1b84709e486db0dbf1e35bfa99
7
- data.tar.gz: 3536e3db8a3183198f8f69f385bc085af35f60b3009267b5da56bb137495b028f5233394faee1834a2c6b751044b3f65395cbb4f621a57e1168f2b80f0912778
6
+ metadata.gz: 6d0f74d393d8e7278e7d61611dcc4cdf935416f32de7de4c8f31ad42588d0f1e0b864218443c5f17f04e94440415f224ac8baba59d06dfbc96391eb338cfc078
7
+ data.tar.gz: 6e084269c1c7ece786b89dc4d48c2f38a61e7d92fc269529ff976fbc803307ce381b8206a01d5ef1008d5d61b0f64bd7eea96e24932e36e2c92feced10ece7a6
@@ -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 54
25
- #define APEX_VERSION_STRING "1.1.54"
24
+ #define APEX_VERSION_PATCH 55
25
+ #define APEX_VERSION_STRING "1.1.55"
26
26
 
27
27
  /**
28
28
  * Processor compatibility modes
@@ -1460,18 +1460,10 @@ static char *apex_preprocess_table_captions(const char *text) {
1460
1460
  is_bracket_caption_line = true;
1461
1461
  } else if ((size_t)(line_end - p) >= 6 &&
1462
1462
  (strncmp(p, "Table:", 6) == 0 || strncmp(p, "table:", 6) == 0)) {
1463
- /* Table: at start of line (after whitespace) - always treat as caption */
1463
+ /* Table: at the start of the line (after whitespace) is a caption.
1464
+ * Do not search later in the line: a cell may contain the text "table:". */
1464
1465
  is_pandoc_caption_line = true;
1465
1466
  } else if (prev_line_was_table_row || prev_line_was_blank || in_table_section) {
1466
- /* Also check for Table: later in the line (when it appears immediately after a table row) */
1467
- const char *table_check = p;
1468
- while (table_check < line_end - 5) {
1469
- if (strncmp(table_check, "Table:", 6) == 0 || strncmp(table_check, "table:", 6) == 0) {
1470
- is_pandoc_caption_line = true;
1471
- break;
1472
- }
1473
- table_check++;
1474
- }
1475
1467
  /* Check for : Caption format (Pandoc-style, only in table context)
1476
1468
  * Require prev_line_was_table_row or in_table_section - NOT prev_line_was_blank alone.
1477
1469
  * prev_line_was_blank alone would wrongly convert "Term\n\n: definition 1" (def list) to caption. */
@@ -1540,14 +1532,8 @@ static char *apex_preprocess_table_captions(const char *text) {
1540
1532
  * because Table: format is unambiguous and should work even after blank lines.
1541
1533
  * However, when it appears immediately after a table row (prev_line_was_table_row=true),
1542
1534
  * we need to ensure the table ends before the caption, so we always insert a blank line. */
1543
- /* Find where 'Table:' or 'table:' appears in the line (might not be at the start) */
1544
- const char *table_marker = strstr(line_start, "Table:");
1545
- if (!table_marker || table_marker >= line_end) {
1546
- table_marker = strstr(line_start, "table:");
1547
- if (!table_marker || table_marker >= line_end) {
1548
- table_marker = p; /* Fallback to p if not found */
1549
- }
1550
- }
1535
+ /* The marker is at the start of the line, after optional whitespace. */
1536
+ const char *table_marker = p;
1551
1537
  const char *caption_start = table_marker + 6; /* after 'Table:' or 'table:' */
1552
1538
  while (caption_start < line_end &&
1553
1539
  (*caption_start == ' ' || *caption_start == '\t')) {
@@ -1589,8 +1575,7 @@ static char *apex_preprocess_table_captions(const char *text) {
1589
1575
  /* If we buffered a blank line, skip it (don't write it) since caption follows */
1590
1576
  buffered_blank_line = false; /* Discard the buffered blank line */
1591
1577
 
1592
- /* If Table: appears in the middle of the line (after table row content),
1593
- * write the table row part first, then the caption */
1578
+ /* Keep indentation before a line-start Table: caption. */
1594
1579
  if (table_marker > line_start) {
1595
1580
  /* Write the table row part (everything before Table:) */
1596
1581
  size_t table_part_len = (size_t)(table_marker - line_start);
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.47"
9
+ VERSION = "1.0.48"
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.47
4
+ version: 1.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra