Skip to content

Add more tests and benchmarks for the Markdown module - #2830

Merged
jviotti merged 2 commits into
mainfrom
markdown-more
Sep 14, 2026
Merged

jviotti merged 2 commits into
mainfrom
markdown-more

Conversation

@jviotti

@jviotti jviotti commented Sep 14, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Sep 14, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR substantially expands validation and performance coverage for the Markdown-to-HTML module.

Changes:

  • Adds Markdown benchmarks for a realistic large document and deliberately pathological inputs.
  • Builds and links the new benchmark only when the Markdown component is enabled.
  • Splits the Markdown unit suite into focused blocks, inline, extension, safety, unsafe-mode, concurrency, and pathological-input sources.
  • Adds broad CommonMark/GFM coverage for headings, lists, quotes, code blocks, links, images, entities, tables, task lists, autolinks, and footnotes.
  • Adds safe-mode and unsafe-mode HTML/URL sanitization cases.
  • Adds boundary tests for deep nesting, long inputs, delimiter runs, reference labels, NUL bytes, and large tables.
  • Moves the pre-existing concurrency and unsafe-mode checks into their dedicated suites.
Technical notes: The benchmarks keep input construction outside the measurement loop and use `benchmark::DoNotOptimize`; all new test sources are registered in the existing Markdown unit executable.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/llvm)

Details
Benchmark suite Current: 8af23fc Previous: b92f149 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2670387346078273 ns/iter 2.197501014315931 ns/iter 1.03
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.2173134645510504 ns/iter 2.18982782138617 ns/iter 1.01
Regex_Period_Asterisk 2.215500318951194 ns/iter 2.189402799050779 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 2.2218461248476564 ns/iter 2.195998350305457 ns/iter 1.01
Regex_Period_Plus 3.112650697827197 ns/iter 2.8138051148577454 ns/iter 1.11
Regex_Period 3.1116331676115903 ns/iter 2.804875416899843 ns/iter 1.11
Regex_Caret_Period_Plus_Dollar 3.113341414305265 ns/iter 2.802042779756224 ns/iter 1.11
Regex_Caret_Group_Period_Plus_Group_Dollar 3.112708253008079 ns/iter 2.8041983934184027 ns/iter 1.11
Regex_Caret_Period_Asterisk_Dollar 3.4333072057755993 ns/iter 3.1148043337662283 ns/iter 1.10
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.424353554180755 ns/iter 3.113862526845565 ns/iter 1.10
Regex_Caret_X_Hyphen 6.88276687536225 ns/iter 6.545796357044454 ns/iter 1.05
Regex_Period_Md_Dollar 27.354291207592418 ns/iter 27.05631339585313 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 6.227185399017824 ns/iter 5.919742722530124 ns/iter 1.05
Regex_Caret_Period_Range_Dollar 4.045833021835373 ns/iter 3.737014940389524 ns/iter 1.08
Regex_Nested_Backtrack 38.92434898022762 ns/iter 38.273075418320445 ns/iter 1.02
JSON_Array_Of_Objects_Unique 426.8573454641759 ns/iter 431.55275823406555 ns/iter 0.99
JSON_Parse_1 4637.861875194649 ns/iter 4626.996047300263 ns/iter 1.00
JSON_Parse_Real 5206.566210794789 ns/iter 5239.975471151573 ns/iter 0.99
JSON_Parse_Decimal 7788.877777283113 ns/iter 7750.039467198267 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 3354308.4857142055 ns/iter 3325796.8436018834 ns/iter 1.01
JSON_Parse_Integer 3724.950620305083 ns/iter 3673.648341371658 ns/iter 1.01
JSON_Parse_String_NonSSO_Plain 3162.625585328418 ns/iter 3061.8211554186973 ns/iter 1.03
JSON_Parse_String_SSO_Plain 2718.4954225726583 ns/iter 2674.8858664078098 ns/iter 1.02
JSON_Parse_String_Escape_Heavy 12368.079562907471 ns/iter 12455.835259559875 ns/iter 0.99
JSON_Parse_Object_Short_Keys 7669.209070583239 ns/iter 7967.786399590054 ns/iter 0.96
JSON_Parse_Object_Scalar_Properties 3948.5174802651645 ns/iter 4051.2652788278037 ns/iter 0.97
JSON_Parse_Object_Array_Properties 5732.022609237087 ns/iter 5353.769693436103 ns/iter 1.07
JSON_Parse_Object_Object_Properties 5470.147761531287 ns/iter 5393.180950551283 ns/iter 1.01
JSON_Parse_Nested_Containers 35670.184198436335 ns/iter 35483.3710901909 ns/iter 1.01
JSON_From_String_Copy 12.02105437566983 ns/iter 11.988444367190151 ns/iter 1.00
JSON_From_String_Temporary 10.01773037359656 ns/iter 10.095354436534953 ns/iter 0.99
JSON_Number_To_Double 21.927827651466853 ns/iter 22.785411992342937 ns/iter 0.96
JSON_Object_At_Last_Key/8 3.8114122210058823 ns/iter 5.8495466703655 ns/iter 0.65
JSON_Object_At_Last_Key/32 12.192507720743578 ns/iter 21.530187928160775 ns/iter 0.57
JSON_Object_At_Last_Key/128 48.58602017405612 ns/iter 87.73366999105006 ns/iter 0.55
JSON_Object_At_Last_Key/512 400.1769740370576 ns/iter 403.25995011000083 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 59.78480559948552 ns/iter 59.917688340057076 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 173.76176248323185 ns/iter 191.67094375775034 ns/iter 0.91
JSON_Divisible_By_Decimal 237.31901420295148 ns/iter 241.30956609604823 ns/iter 0.98
JSON_String_Equal/10 6.2747414263445815 ns/iter 5.925750635775986 ns/iter 1.06
JSON_String_Equal/100 6.861297302756051 ns/iter 6.553858260928796 ns/iter 1.05
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9377593550026564 ns/iter 0.9369308666621999 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.60463636981438 ns/iter 10.278987531633893 ns/iter 1.03
JSON_String_Fast_Hash/10 2.5508382843487047 ns/iter 2.494888411900892 ns/iter 1.02
JSON_String_Fast_Hash/100 2.492297786125726 ns/iter 2.4960993810680425 ns/iter 1.00
JSON_String_Key_Hash/10 2.1825088238081833 ns/iter 2.5003309915167726 ns/iter 0.87
JSON_String_Key_Hash/100 6.540384874629927 ns/iter 6.542154031682018 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 2.7747308600467817 ns/iter 2.7372927373594647 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Small 2.7192856954902593 ns/iter 2.894212358917806 ns/iter 0.94
JSON_Object_Defines_Miss_Too_Large 3.425863734570037 ns/iter 3.176262313371539 ns/iter 1.08
Pointer_Object_Traverse 29.311695130371874 ns/iter 29.402787760176317 ns/iter 1.00
Pointer_Object_Try_Traverse 30.20529690296593 ns/iter 30.24156373857057 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 150.72020691688854 ns/iter 145.059452690027 ns/iter 1.04
Pointer_Walker_Schema_ISO_Language 1500124.7714285906 ns/iter 1524620.213507569 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/0 1295656.2998236998 ns/iter 1229534.154115612 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/1 1637099.2383176908 ns/iter 1680568.524154616 ns/iter 0.97
Pointer_Position_Tracker_Get_Deeply_Nested 608.8642121448198 ns/iter 608.6048497436743 ns/iter 1.00
Schema_Tracker_ISO_Language 4497642.649681484 ns/iter 4614320.75163408 ns/iter 0.97
Schema_Tracker_ISO_Language_To_JSON 16396977.976743856 ns/iter 16858142.499999862 ns/iter 0.97
Schema_Frame_WoT_References 2232069.1464967676 ns/iter 2229258.8639240237 ns/iter 1.00
Schema_Frame_OMC_References 9891238.136985945 ns/iter 9626784.624999847 ns/iter 1.03
Schema_Frame_OMC_Pointers 18266520.894736744 ns/iter 18364150.394736618 ns/iter 0.99
Schema_Frame_OMC_Locations 8286317.917646985 ns/iter 8288407.107143043 ns/iter 1.00
Schema_Frame_ISO_Language_Locations 41112508.94117588 ns/iter 42173935.75000017 ns/iter 0.97
Schema_Frame_ISO_Language_Root 292.0554699595833 ns/iter 311.50168800353487 ns/iter 0.94
Schema_Frame_KrakenD_References 15149225.413042784 ns/iter 15727370.022222606 ns/iter 0.96
Schema_Frame_KrakenD_Reachable 136969995.00001538 ns/iter 133891686.80000694 ns/iter 1.02
Schema_Frame_ISO_Language_Locations_To_JSON 32102628.54545673 ns/iter 31784212.08695642 ns/iter 1.01
Schema_Frame_Many_Resources_References 138773460.5999981 ns/iter 137715026.20000434 ns/iter 1.01
Schema_Frame_Deeply_Nested_References 11066966.46031777 ns/iter 11390612.725806149 ns/iter 0.97
JSONPath_Descendant_Filter_Nested 1522.4345680193471 ns/iter 1579.7060554794134 ns/iter 0.96
URITemplateRouter_Create 23380.697385512212 ns/iter 22977.847187429303 ns/iter 1.02
URITemplateRouter_Match 177.8628300160942 ns/iter 178.60122383616587 ns/iter 1.00
URITemplateRouter_Match_BasePath 205.6843508695074 ns/iter 205.78821781977285 ns/iter 1.00
URITemplateRouterView_Restore 8457.222039630024 ns/iter 8426.42635290785 ns/iter 1.00
URITemplateRouterView_Match 163.43855908498492 ns/iter 164.36653948851514 ns/iter 0.99
URITemplateRouterView_Match_BasePath 186.64478744745605 ns/iter 186.19531523917664 ns/iter 1.00
URITemplateRouterView_Arguments 433.9339306286843 ns/iter 439.9666215601159 ns/iter 0.99
JSONL_Parse_Large 9130687.389610361 ns/iter 9392956.546666937 ns/iter 0.97
JSONL_Parse_Large_GZIP 9279100.253333278 ns/iter 9479367.81081067 ns/iter 0.98
JSONLD_Catalog_Annotation_List_Populate 604565.8940568381 ns/iter 591459.0667793342 ns/iter 1.02
JSONLD_Catalog_Materialize 3577314.6269429317 ns/iter 3535931.1868686783 ns/iter 1.01
HTML_Build_Table_100000 57819649.81818274 ns/iter 55999538.63636322 ns/iter 1.03
HTML_Render_Table_100000 1881979.9531680979 ns/iter 1900725.2146739108 ns/iter 0.99
Markdown_To_HTML_Realistic_Document 12912353.87272681 ns/iter
Markdown_To_HTML_Pathological 48570407.07143158 ns/iter
GZIP_Compress_ISO_Language_Set_3_Locations 37506104.842105076 ns/iter 37484891.78947298 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 5128478.185185015 ns/iter 5120878.839416021 ns/iter 1.00
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 7079224.632652582 ns/iter 7087649.474747403 ns/iter 1.00
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 9635586.82608733 ns/iter 8789856.425000409 ns/iter 1.10
GZIP_Compress_ISO_Language_Set_3_Schema 2228302.7571884533 ns/iter 2207351.2681388557 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Schema 421631.9336550245 ns/iter 419800.4683544578 ns/iter 1.00
JOSE_VerifySignature_RS256 46765.28217623581 ns/iter 46836.184837934576 ns/iter 1.00
JOSE_VerifySignature_ES512 1723020.4926108976 ns/iter 1740124.6370370223 ns/iter 0.99
CRYPTO_CRC32_Large_JSONL 102052.45777518854 ns/iter 101910.71301775122 ns/iter 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 11 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/markdown/markdown_concurrency_test.cc">

<violation number="1" location="test/markdown/markdown_concurrency_test.cc:26">
P3: The 16 EXPECT_EQ lines each assert the identical expected string against a different results element. Collapse them into a loop over `results` so a future change to the expected output or the thread count is updated once instead of sixteen times.</violation>
</file>

<file name="benchmark/markdown.cc">

<violation number="1" location="benchmark/markdown.cc:19">
P3: `Markdown_To_HTML_Pathological` duplicates the pathological fixture already maintained by `test/markdown/markdown_pathological_test.cc`, including these helper implementations. Move the shared fixture generators and cases into a common internal header so regression coverage and benchmark coverage cannot silently desynchronize.</violation>
</file>

<file name="test/markdown/markdown_unsafe_test.cc">

<violation number="1" location="test/markdown/markdown_unsafe_test.cc:81">
P1: This test asserts the wrong output and will fail. Per CommonMark and the cmark-gfm source (blocks.c: `cont_type != CMARK_NODE_PARAGRAPH && scan_html_block_start_7(...)`), a type-7 closing tag like `</div>` cannot interrupt a paragraph, so after the blank line, `*two*\n</div>` stays one paragraph. Expect `<p><em>two</em>\n</div></p>\n` instead of splitting `</div>` out of the paragraph.</violation>
</file>

<file name="test/markdown/markdown_pathological_test.cc">

<violation number="1" location="test/markdown/markdown_pathological_test.cc:193">
P2: The expected output assumes cmark-gfm nests lists deeper than it does. The sibling `alternating_..._beyond_depth_limit` test in this file shows container nesting is truncated at ~49 levels, and the vendored cmark-gfm enforces a `MAX_LIST_DEPTH` cap in `blocks.c`. A 150-level staircase cannot produce the 149-deep nested `<ul>` expectation here. Run the test once against the vendored cmark-gfm; if the parser caps list nesting, either lower the staircase depth to the actual cap or build the expectation from the parser's real (truncated) output.</violation>
</file>

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

TEST(html_block_ends_at_blank_line) {
const auto result{sourcemeta::core::markdown_to_html(
"<div>\n*one*\n\n*two*\n</div>", false)};
EXPECT_EQ(result, "<div>\n"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This test asserts the wrong output and will fail. Per CommonMark and the cmark-gfm source (blocks.c: cont_type != CMARK_NODE_PARAGRAPH && scan_html_block_start_7(...)), a type-7 closing tag like </div> cannot interrupt a paragraph, so after the blank line, *two*\n</div> stays one paragraph. Expect <p><em>two</em>\n</div></p>\n instead of splitting </div> out of the paragraph.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/markdown/markdown_unsafe_test.cc, line 81:

<comment>This test asserts the wrong output and will fail. Per CommonMark and the cmark-gfm source (blocks.c: `cont_type != CMARK_NODE_PARAGRAPH && scan_html_block_start_7(...)`), a type-7 closing tag like `</div>` cannot interrupt a paragraph, so after the blank line, `*two*\n</div>` stays one paragraph. Expect `<p><em>two</em>\n</div></p>\n` instead of splitting `</div>` out of the paragraph.</comment>

<file context>
@@ -0,0 +1,323 @@
+TEST(html_block_ends_at_blank_line) {
+  const auto result{sourcemeta::core::markdown_to_html(
+      "<div>\n*one*\n\n*two*\n</div>", false)};
+  EXPECT_EQ(result, "<div>\n"
+                    "*one*\n"
+                    "<p><em>two</em></p>\n"
</file context>

repeat("</li>\n</ul>\n</blockquote>\n", 49));
}

TEST(staircase_list_of_one_hundred_fifty_levels) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The expected output assumes cmark-gfm nests lists deeper than it does. The sibling alternating_..._beyond_depth_limit test in this file shows container nesting is truncated at ~49 levels, and the vendored cmark-gfm enforces a MAX_LIST_DEPTH cap in blocks.c. A 150-level staircase cannot produce the 149-deep nested <ul> expectation here. Run the test once against the vendored cmark-gfm; if the parser caps list nesting, either lower the staircase depth to the actual cap or build the expectation from the parser's real (truncated) output.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/markdown/markdown_pathological_test.cc, line 193:

<comment>The expected output assumes cmark-gfm nests lists deeper than it does. The sibling `alternating_..._beyond_depth_limit` test in this file shows container nesting is truncated at ~49 levels, and the vendored cmark-gfm enforces a `MAX_LIST_DEPTH` cap in `blocks.c`. A 150-level staircase cannot produce the 149-deep nested `<ul>` expectation here. Run the test once against the vendored cmark-gfm; if the parser caps list nesting, either lower the staircase depth to the actual cap or build the expectation from the parser's real (truncated) output.</comment>

<file context>
@@ -0,0 +1,251 @@
+                        repeat("</li>\n</ul>\n</blockquote>\n", 49));
+}
+
+TEST(staircase_list_of_one_hundred_fifty_levels) {
+  const auto result{sourcemeta::core::markdown_to_html(staircase_list(150))};
+  EXPECT_EQ(result, repeat("<ul>\n<li>level\n", 149) +
</file context>

Comment on lines +26 to +41
EXPECT_EQ(results[0], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[1], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[2], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[3], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[4], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[5], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[6], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[7], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[8], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[9], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[10], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[11], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[12], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[13], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[14], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[15], "<p><strong>hello</strong> world</p>\n");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The 16 EXPECT_EQ lines each assert the identical expected string against a different results element. Collapse them into a loop over results so a future change to the expected output or the thread count is updated once instead of sixteen times.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/markdown/markdown_concurrency_test.cc, line 26:

<comment>The 16 EXPECT_EQ lines each assert the identical expected string against a different results element. Collapse them into a loop over `results` so a future change to the expected output or the thread count is updated once instead of sixteen times.</comment>

<file context>
@@ -0,0 +1,42 @@
+    thread.join();
+  }
+
+  EXPECT_EQ(results[0], "<p><strong>hello</strong> world</p>\n");
+  EXPECT_EQ(results[1], "<p><strong>hello</strong> world</p>\n");
+  EXPECT_EQ(results[2], "<p><strong>hello</strong> world</p>\n");
</file context>
Suggested change
EXPECT_EQ(results[0], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[1], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[2], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[3], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[4], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[5], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[6], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[7], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[8], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[9], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[10], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[11], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[12], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[13], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[14], "<p><strong>hello</strong> world</p>\n");
EXPECT_EQ(results[15], "<p><strong>hello</strong> world</p>\n");
for (const auto &result : results) {
EXPECT_EQ(result, "<p><strong>hello</strong> world</p>\n");
}

Comment thread benchmark/markdown.cc
return result;
}

static auto increasing_backtick_runs(const std::size_t count) -> std::string {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Markdown_To_HTML_Pathological duplicates the pathological fixture already maintained by test/markdown/markdown_pathological_test.cc, including these helper implementations. Move the shared fixture generators and cases into a common internal header so regression coverage and benchmark coverage cannot silently desynchronize.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At benchmark/markdown.cc, line 19:

<comment>`Markdown_To_HTML_Pathological` duplicates the pathological fixture already maintained by `test/markdown/markdown_pathological_test.cc`, including these helper implementations. Move the shared fixture generators and cases into a common internal header so regression coverage and benchmark coverage cannot silently desynchronize.</comment>

<file context>
@@ -0,0 +1,103 @@
+  return result;
+}
+
+static auto increasing_backtick_runs(const std::size_t count) -> std::string {
+  std::string result;
+  for (std::size_t length = 1; length <= count; ++length) {
</file context>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/gcc)

Details
Benchmark suite Current: 8af23fc Previous: b92f149 Ratio
CRYPTO_CRC32_Large_JSONL 115001.46420931598 ns/iter 102292.67348157275 ns/iter 1.12
JOSE_VerifySignature_RS256 24557.206711550945 ns/iter 22044.267375974352 ns/iter 1.11
JOSE_VerifySignature_ES512 650176.187906984 ns/iter 584488.1270386083 ns/iter 1.11
GZIP_Compress_ISO_Language_Set_3_Locations 31967205.72727362 ns/iter 30130170.391304467 ns/iter 1.06
GZIP_Decompress_ISO_Language_Set_3_Locations 5680649.86399986 ns/iter 5264177.840909194 ns/iter 1.08
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 7501749.655914018 ns/iter 7290645.250000338 ns/iter 1.03
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 9843502.985714687 ns/iter 9835041.420290614 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Schema 2343849.0557377473 ns/iter 2049921.2697946762 ns/iter 1.14
GZIP_Decompress_ISO_Language_Set_3_Schema 345797.0705476166 ns/iter 432687.45607474697 ns/iter 0.80
Markdown_To_HTML_Realistic_Document 10862814.76923082 ns/iter
Markdown_To_HTML_Pathological 43954388.18750108 ns/iter
HTML_Build_Table_100000 72215032.5555554 ns/iter 54258972.181814484 ns/iter 1.33
HTML_Render_Table_100000 2219912.905228683 ns/iter 1843668.0552631994 ns/iter 1.20
JSONLD_Catalog_Annotation_List_Populate 688468.4447702799 ns/iter 712646.8006103445 ns/iter 0.97
JSONLD_Catalog_Materialize 3652424.206030279 ns/iter 3522825.246231111 ns/iter 1.04
JSONL_Parse_Large 9666023.958904793 ns/iter 10014964.391304431 ns/iter 0.97
JSONL_Parse_Large_GZIP 9808209.929577567 ns/iter 10159090.173913129 ns/iter 0.97
URITemplateRouter_Create 19734.83725734248 ns/iter 20740.754841771908 ns/iter 0.95
URITemplateRouter_Match 143.26044711472474 ns/iter 157.52089637041138 ns/iter 0.91
URITemplateRouter_Match_BasePath 176.65121950907533 ns/iter 188.47103901687527 ns/iter 0.94
URITemplateRouterView_Restore 9790.586339090583 ns/iter 8401.971745118855 ns/iter 1.17
URITemplateRouterView_Match 126.59725907276152 ns/iter 127.36607911186202 ns/iter 0.99
URITemplateRouterView_Match_BasePath 147.0011430080553 ns/iter 147.87252213297054 ns/iter 0.99
URITemplateRouterView_Arguments 458.10613829761223 ns/iter 489.5225798505242 ns/iter 0.94
JSONPath_Descendant_Filter_Nested 1692.9642755431043 ns/iter 1674.0044600365432 ns/iter 1.01
Schema_Frame_WoT_References 2288541.7350993375 ns/iter 2297062.347540983 ns/iter 1.00
Schema_Frame_OMC_References 12320084.492537363 ns/iter 10361595.95522424 ns/iter 1.19
Schema_Frame_OMC_Pointers 21567513.866665423 ns/iter 18908412.05555521 ns/iter 1.14
Schema_Frame_OMC_Locations 9618588.594594872 ns/iter 8689069.641975408 ns/iter 1.11
Schema_Frame_ISO_Language_Locations 46206767.07142885 ns/iter 41905437.812499 ns/iter 1.10
Schema_Frame_ISO_Language_Root 275.4497201570877 ns/iter 292.56508348410404 ns/iter 0.94
Schema_Frame_KrakenD_References 19661084.085714716 ns/iter 16061078.568181517 ns/iter 1.22
Schema_Frame_KrakenD_Reachable 109267599.66667987 ns/iter 126360337.20000342 ns/iter 0.86
Schema_Frame_ISO_Language_Locations_To_JSON 34363223.21052605 ns/iter 30967127.72727208 ns/iter 1.11
Schema_Frame_Many_Resources_References 149244707.00000256 ns/iter 137590880.4000005 ns/iter 1.08
Schema_Frame_Deeply_Nested_References 11614088.578946728 ns/iter 10897776.095237618 ns/iter 1.07
Pointer_Object_Traverse 24.47944833563523 ns/iter 25.331067857541363 ns/iter 0.97
Pointer_Object_Try_Traverse 27.246248821132063 ns/iter 24.692041497918517 ns/iter 1.10
Pointer_Push_Back_Pointer_To_Weak_Pointer 142.65084066232384 ns/iter 131.57091160422223 ns/iter 1.08
Pointer_Walker_Schema_ISO_Language 1447081.5407098322 ns/iter 1514220.496688691 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/0 1256125.965579672 ns/iter 1260965.4469964278 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1732031.5511221706 ns/iter 1927237.4447513977 ns/iter 0.90
Pointer_Position_Tracker_Get_Deeply_Nested 657.6627905642611 ns/iter 616.9544079178143 ns/iter 1.07
Schema_Tracker_ISO_Language 5070440.558823631 ns/iter 4895007.01398596 ns/iter 1.04
Schema_Tracker_ISO_Language_To_JSON 15290849.934782205 ns/iter 15900240.954545615 ns/iter 0.96
JSON_Array_Of_Objects_Unique 473.39303339833873 ns/iter 453.52277497398893 ns/iter 1.04
JSON_Parse_1 5201.850111922811 ns/iter 5371.047753260676 ns/iter 0.97
JSON_Parse_Real 5361.921427364356 ns/iter 5476.585072689145 ns/iter 0.98
JSON_Parse_Decimal 8940.422450257205 ns/iter 10102.293407022109 ns/iter 0.88
JSON_Parse_Schema_ISO_Language 3688972.64550267 ns/iter 3738821.370967754 ns/iter 0.99
JSON_Parse_Integer 3728.7014528284003 ns/iter 3804.1590101398942 ns/iter 0.98
JSON_Parse_String_NonSSO_Plain 3467.5153390050928 ns/iter 3546.9494801744404 ns/iter 0.98
JSON_Parse_String_SSO_Plain 2909.683055175925 ns/iter 3108.120315038781 ns/iter 0.94
JSON_Parse_String_Escape_Heavy 15618.590098518687 ns/iter 16559.47800302417 ns/iter 0.94
JSON_Parse_Object_Short_Keys 8945.511604401509 ns/iter 8630.40924202103 ns/iter 1.04
JSON_Parse_Object_Scalar_Properties 4524.211171476933 ns/iter 4402.642429356789 ns/iter 1.03
JSON_Parse_Object_Array_Properties 6687.7976624153 ns/iter 6833.084863528368 ns/iter 0.98
JSON_Parse_Object_Object_Properties 6729.248613024599 ns/iter 6978.350643139718 ns/iter 0.96
JSON_Parse_Nested_Containers 40077.58694036357 ns/iter 40682.61691687576 ns/iter 0.99
JSON_From_String_Copy 9.680732369980271 ns/iter 9.02395856803381 ns/iter 1.07
JSON_From_String_Temporary 8.047010668822827 ns/iter 7.8352817400584245 ns/iter 1.03
JSON_Number_To_Double 20.76558544337563 ns/iter 19.37412003166588 ns/iter 1.07
JSON_Object_At_Last_Key/8 6.685746358633778 ns/iter 3.749142700406637 ns/iter 1.78
JSON_Object_At_Last_Key/32 24.623669330081263 ns/iter 11.982206588536078 ns/iter 2.06
JSON_Object_At_Last_Key/128 92.2779753956487 ns/iter 48.71226926037241 ns/iter 1.89
JSON_Object_At_Last_Key/512 378.66090859902715 ns/iter 358.47607783194815 ns/iter 1.06
JSON_Fast_Hash_Helm_Chart_Lock 89.11495868075296 ns/iter 71.92903769501115 ns/iter 1.24
JSON_Equality_Helm_Chart_Lock 168.8262022473692 ns/iter 156.053873178413 ns/iter 1.08
JSON_Divisible_By_Decimal 266.5302489246056 ns/iter 274.4084845443667 ns/iter 0.97
JSON_String_Equal/10 6.07938845225872 ns/iter 5.730766072396667 ns/iter 1.06
JSON_String_Equal/100 6.771088731039564 ns/iter 6.355984191927255 ns/iter 1.07
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7114846845293868 ns/iter 0.7503409971869296 ns/iter 0.95
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 21.970539460037063 ns/iter 19.654192595341826 ns/iter 1.12
JSON_String_Fast_Hash/10 3.407087781449289 ns/iter 3.153571699928498 ns/iter 1.08
JSON_String_Fast_Hash/100 3.2255506640075646 ns/iter 3.1712683939645703 ns/iter 1.02
JSON_String_Key_Hash/10 1.7582257006406155 ns/iter 1.248178986923272 ns/iter 1.41
JSON_String_Key_Hash/100 15.02091523220859 ns/iter 12.451141554931063 ns/iter 1.21
JSON_Object_Defines_Miss_Same_Length 3.1655109824822465 ns/iter 3.116724787984991 ns/iter 1.02
JSON_Object_Defines_Miss_Too_Small 3.174278350037702 ns/iter 3.1145463148092296 ns/iter 1.02
JSON_Object_Defines_Miss_Too_Large 3.1637614593839394 ns/iter 3.122104327461172 ns/iter 1.01
Regex_Lower_S_Or_Upper_S_Asterisk 0.7034752038255871 ns/iter 2.3376184450690136 ns/iter 0.30
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.7197756897841818 ns/iter 2.4151987824365784 ns/iter 0.30
Regex_Period_Asterisk 0.7043984610987462 ns/iter 2.4192455202884724 ns/iter 0.29
Regex_Group_Period_Asterisk_Group 0.7033071490121116 ns/iter 2.339214238544512 ns/iter 0.30
Regex_Period_Plus 0.7033862690202863 ns/iter 2.340002150221078 ns/iter 0.30
Regex_Period 0.703233817292155 ns/iter 2.415267798928412 ns/iter 0.29
Regex_Caret_Period_Plus_Dollar 0.7060966491507155 ns/iter 2.4138870564965527 ns/iter 0.29
Regex_Caret_Group_Period_Plus_Group_Dollar 0.7032365106866122 ns/iter 2.3364232329316788 ns/iter 0.30
Regex_Caret_Period_Asterisk_Dollar 0.7028134107267456 ns/iter 2.3365202278905044 ns/iter 0.30
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.7032393843914386 ns/iter 2.419185285836757 ns/iter 0.29
Regex_Caret_X_Hyphen 4.223850866788392 ns/iter 6.4708104579572385 ns/iter 0.65
Regex_Period_Md_Dollar 32.55806642018184 ns/iter 30.863598485146966 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 4.5707638019132775 ns/iter 7.539400569295638 ns/iter 0.61
Regex_Caret_Period_Range_Dollar 1.4063729127705762 ns/iter 2.8850845803979466 ns/iter 0.49
Regex_Nested_Backtrack 42.22864706719859 ns/iter 39.95618577907245 ns/iter 1.06

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (windows/msvc)

Details
Benchmark suite Current: 8af23fc Previous: b92f149 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.022227678571665 ns/iter 4.973489999999856 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.149988999999664 ns/iter 5.457985000000463 ns/iter 0.94
Regex_Period_Asterisk 5.088855999999851 ns/iter 5.395184999999856 ns/iter 0.94
Regex_Group_Period_Asterisk_Group 5.093032999999991 ns/iter 5.438946428571155 ns/iter 0.94
Regex_Period_Plus 5.115470000000073 ns/iter 4.718917857143115 ns/iter 1.08
Regex_Period 5.120135000000232 ns/iter 4.7383687605755735 ns/iter 1.08
Regex_Caret_Period_Plus_Dollar 5.034910999999624 ns/iter 4.772600892857375 ns/iter 1.05
Regex_Caret_Group_Period_Plus_Group_Dollar 5.104367000000138 ns/iter 4.802902678570879 ns/iter 1.06
Regex_Caret_Period_Asterisk_Dollar 5.102050892857234 ns/iter 5.295008000000507 ns/iter 0.96
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.226974999999925 ns/iter 5.3532449999988785 ns/iter 0.98
Regex_Caret_X_Hyphen 8.2900491071428 ns/iter 7.86240290178597 ns/iter 1.05
Regex_Period_Md_Dollar 47.81665548336868 ns/iter 77.3458258928526 ns/iter 0.62
Regex_Caret_Slash_Period_Asterisk 7.975533482142337 ns/iter 7.439206473213643 ns/iter 1.07
Regex_Caret_Period_Range_Dollar 5.7367598214282465 ns/iter 5.382132999998247 ns/iter 1.07
Regex_Nested_Backtrack 58.31806249999667 ns/iter 85.14220602042569 ns/iter 0.68
JSON_Array_Of_Objects_Unique 574.0930357142864 ns/iter 815.4117187501189 ns/iter 0.70
JSON_Parse_1 9230.374864397849 ns/iter 9182.079097861679 ns/iter 1.01
JSON_Parse_Real 15993.30803571394 ns/iter 18486.654017857112 ns/iter 0.87
JSON_Parse_Decimal 11897.604687499452 ns/iter 11230.243749999147 ns/iter 1.06
JSON_Parse_Schema_ISO_Language 7651321.428571327 ns/iter 8322634.444443288 ns/iter 0.92
JSON_Parse_Integer 6165.9044642853805 ns/iter 5965.33303571383 ns/iter 1.03
JSON_Parse_String_NonSSO_Plain 8675.689732142722 ns/iter 8141.036830358368 ns/iter 1.07
JSON_Parse_String_SSO_Plain 3819.7712053571795 ns/iter 3645.252409091132 ns/iter 1.05
JSON_Parse_String_Escape_Heavy 22410.493186461215 ns/iter 22077.299360503264 ns/iter 1.02
JSON_Parse_Object_Short_Keys 13361.87070593493 ns/iter 13001.453571429725 ns/iter 1.03
JSON_Parse_Object_Scalar_Properties 6758.266964285704 ns/iter 6628.526785714684 ns/iter 1.02
JSON_Parse_Object_Array_Properties 11276.643750000481 ns/iter 11579.239062502465 ns/iter 0.97
JSON_Parse_Object_Object_Properties 11667.712499999538 ns/iter 12027.346428571458 ns/iter 0.97
JSON_Parse_Nested_Containers 82713.97321428152 ns/iter 82679.41964287421 ns/iter 1.00
JSON_From_String_Copy 70.05498883928699 ns/iter 62.59446428570316 ns/iter 1.12
JSON_From_String_Temporary 61.0082142857138 ns/iter 85.30960333440463 ns/iter 0.72
JSON_Number_To_Double 121.38392187500459 ns/iter 135.21844642854472 ns/iter 0.90
JSON_Object_At_Last_Key/8 7.582340401785435 ns/iter 7.517271205357597 ns/iter 1.01
JSON_Object_At_Last_Key/32 23.26470000000036 ns/iter 25.477995036682152 ns/iter 0.91
JSON_Object_At_Last_Key/128 89.67237992534245 ns/iter 94.75460737701908 ns/iter 0.95
JSON_Object_At_Last_Key/512 428.05451107993184 ns/iter 430.2291565090037 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 102.2777812499953 ns/iter 121.8970178571307 ns/iter 0.84
JSON_Equality_Helm_Chart_Lock 210.51772497689115 ns/iter 208.09392151366478 ns/iter 1.01
JSON_Divisible_By_Decimal 315.24843750000895 ns/iter 386.89235491075533 ns/iter 0.81
JSON_String_Equal/10 10.416385937499939 ns/iter 9.952415580570838 ns/iter 1.05
JSON_String_Equal/100 11.661008928571041 ns/iter 11.784926562498299 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 2.5386925000000407 ns/iter 2.12520468749986 ns/iter 1.19
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 15.051348214285555 ns/iter 15.371022321427779 ns/iter 0.98
JSON_String_Fast_Hash/10 6.687786830357518 ns/iter 6.384068750000844 ns/iter 1.05
JSON_String_Fast_Hash/100 6.743656250000031 ns/iter 6.374664285713396 ns/iter 1.06
JSON_String_Key_Hash/10 5.415541999999506 ns/iter 5.15143099999932 ns/iter 1.05
JSON_String_Key_Hash/100 11.98575937499946 ns/iter 11.326875000001735 ns/iter 1.06
JSON_Object_Defines_Miss_Same_Length 4.722081228732754 ns/iter 4.167422499999418 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 4.72396206411635 ns/iter 4.678437686925153 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Large 4.749300010601152 ns/iter 55.491359999998615 ns/iter 0.08558629686858045
Pointer_Object_Traverse 70.85766741071912 ns/iter 228.47005676471926 ns/iter 0.31
Pointer_Object_Try_Traverse 71.17884821428484 ns/iter 194.22650025773962 ns/iter 0.37
Pointer_Push_Back_Pointer_To_Weak_Pointer 167.45779017857438 ns/iter 285.8657142857015 ns/iter 0.59
Pointer_Walker_Schema_ISO_Language 10780906.250000833 ns/iter 23321458.823528808 ns/iter 0.46
Pointer_Maybe_Tracked_Deeply_Nested/0 2439647.15719074 ns/iter 3034599.4413406956 ns/iter 0.80
Pointer_Maybe_Tracked_Deeply_Nested/1 3739857.435897566 ns/iter 3919346.987952093 ns/iter 0.95
Pointer_Position_Tracker_Get_Deeply_Nested 565.2651785714725 ns/iter 749.8709054413287 ns/iter 0.75
Schema_Tracker_ISO_Language 10720535.937499775 ns/iter 12354541.333334055 ns/iter 0.87
Schema_Tracker_ISO_Language_To_JSON 63419160.000000834 ns/iter 72011518.18181147 ns/iter 0.88
Schema_Frame_WoT_References 5533037.500000099 ns/iter 5666272.999999365 ns/iter 0.98
Schema_Frame_OMC_References 23477783.33333205 ns/iter 27149816.666663658 ns/iter 0.86
Schema_Frame_OMC_Pointers 43825349.99999876 ns/iter 48547578.57143406 ns/iter 0.90
Schema_Frame_OMC_Locations 20013275.675675895 ns/iter 22151463.333329957 ns/iter 0.90
Schema_Frame_ISO_Language_Locations 81907085.7142898 ns/iter 98203616.66663758 ns/iter 0.83
Schema_Frame_ISO_Language_Root 2351.153291123589 ns/iter 2395.5857142855816 ns/iter 0.98
Schema_Frame_KrakenD_References 41635511.76470585 ns/iter 46150013.333332635 ns/iter 0.90
Schema_Frame_KrakenD_Reachable 263770366.66667664 ns/iter 233595299.99985778 ns/iter 1.13
Schema_Frame_ISO_Language_Locations_To_JSON 163277550.00000367 ns/iter 181991350.0000325 ns/iter 0.90
Schema_Frame_Many_Resources_References 737964399.999953 ns/iter 759111399.9999379 ns/iter 0.97
Schema_Frame_Deeply_Nested_References 21931379.16666643 ns/iter 24430508.33333397 ns/iter 0.90
JSONPath_Descendant_Filter_Nested 2399.0057142857577 ns/iter 2662.8199719553345 ns/iter 0.90
URITemplateRouter_Create 41678.47887663535 ns/iter 41260.97752064973 ns/iter 1.01
URITemplateRouter_Match 234.24469483875566 ns/iter 224.37576736875792 ns/iter 1.04
URITemplateRouter_Match_BasePath 265.78890249058065 ns/iter 266.7017797634975 ns/iter 1.00
URITemplateRouterView_Restore 33858.65091642171 ns/iter 25781.18620271294 ns/iter 1.31
URITemplateRouterView_Match 179.9459674070962 ns/iter 189.00856846041808 ns/iter 0.95
URITemplateRouterView_Match_BasePath 202.04355348020064 ns/iter 202.8640627557281 ns/iter 1.00
URITemplateRouterView_Arguments 541.6657142857518 ns/iter 631.0951785713265 ns/iter 0.86
JSONL_Parse_Large 32934642.85714468 ns/iter 33358069.999997042 ns/iter 0.99
JSONL_Parse_Large_GZIP 31980452.380951516 ns/iter 32502561.904764317 ns/iter 0.98
JSONLD_Catalog_Annotation_List_Populate 3024648.214285719 ns/iter 3230171.0784315006 ns/iter 0.94
JSONLD_Catalog_Materialize 8256641.111111347 ns/iter 9554963.999999018 ns/iter 0.86
HTML_Build_Table_100000 92005371.42857814 ns/iter 96451499.99999246 ns/iter 0.95
HTML_Render_Table_100000 7705470.535714402 ns/iter 8151354.444445739 ns/iter 0.95
Markdown_To_HTML_Realistic_Document 28419076.000000134 ns/iter
Markdown_To_HTML_Pathological 177102049.9999878 ns/iter
GZIP_Compress_ISO_Language_Set_3_Locations 37993036.84210624 ns/iter 42197817.64706621 ns/iter 0.90
GZIP_Decompress_ISO_Language_Set_3_Locations 9685919.999999441 ns/iter 10535250.666665282 ns/iter 0.92
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 11975608.928571953 ns/iter 12878453.57142763 ns/iter 0.93
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 14569078.000000672 ns/iter 16396708.108102856 ns/iter 0.89
GZIP_Compress_ISO_Language_Set_3_Schema 2317546.2499999357 ns/iter 2733571.48594424 ns/iter 0.85
GZIP_Decompress_ISO_Language_Set_3_Schema 630348.6607143226 ns/iter 650564.8437499393 ns/iter 0.97
JOSE_VerifySignature_RS256 21372.81562499993 ns/iter 24246.910714282425 ns/iter 0.88
JOSE_VerifySignature_ES512 1406327.3092369717 ns/iter 1598603.0357144694 ns/iter 0.88
CRYPTO_CRC32_Large_JSONL 104727.62823088585 ns/iter 120558.56249997277 ns/iter 0.87

This comment was automatically generated by workflow using github-action-benchmark.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 27 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/markdown/markdown_links_test.cc">

<violation number="1" location="test/markdown/markdown_links_test.cc:206">
P2: This expectation contradicts CommonMark thematic-break handling. After the link reference definition `[docs]: /manual` is consumed, the `---` line is no longer a setext heading underline (the preceding block is not a paragraph) and should parse as a thematic break `<hr />`, giving `<hr />\n<p><a href="/manual">docs</a></p>\n`. The test instead asserts the `---` is literal paragraph text. If cmark-gfm truly emits the literal form, this test is documenting a non-spec behavior; either way the expectation should be verified against the parser output, since it does not match the reference rendering.</violation>
</file>

<file name="test/markdown/markdown_characters_test.cc">

<violation number="1" location="test/markdown/markdown_characters_test.cc:142">
P2: The Greek test embeds raw UTF-8 bytes directly in the source while every other non-ASCII test in this file uses \xNN hex escapes. MSVC decodes a BOM-less source with the system ANSI code page (this build does not pass /utf-8), so "λέξη και φράση" would not produce the UTF-8 bytes that the expected hex value requires, and the test fails on Windows. Write the input literal as hex escapes to match the expected string and the file's convention.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread test/markdown/markdown_code_spans_test.cc
EXPECT_EQ(result, "<p>cost: $5 + 10% ; done?</p>\n");
}

TEST(text_with_greek_characters) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The Greek test embeds raw UTF-8 bytes directly in the source while every other non-ASCII test in this file uses \xNN hex escapes. MSVC decodes a BOM-less source with the system ANSI code page (this build does not pass /utf-8), so "λέξη και φράση" would not produce the UTF-8 bytes that the expected hex value requires, and the test fails on Windows. Write the input literal as hex escapes to match the expected string and the file's convention.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/markdown/markdown_characters_test.cc, line 142:

<comment>The Greek test embeds raw UTF-8 bytes directly in the source while every other non-ASCII test in this file uses \xNN hex escapes. MSVC decodes a BOM-less source with the system ANSI code page (this build does not pass /utf-8), so "λέξη και φράση" would not produce the UTF-8 bytes that the expected hex value requires, and the test fails on Windows. Write the input literal as hex escapes to match the expected string and the file's convention.</comment>

<file context>
@@ -0,0 +1,487 @@
+  EXPECT_EQ(result, "<p>cost: $5 + 10% ; done?</p>\n");
+}
+
+TEST(text_with_greek_characters) {
+  const auto result{sourcemeta::core::markdown_to_html("λέξη και φράση")};
+  EXPECT_EQ(result,
</file context>

Comment on lines +206 to +207
sourcemeta::core::markdown_to_html("[docs]: /manual\n---\n[docs]")};
EXPECT_EQ(result, "<p>---\n"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This expectation contradicts CommonMark thematic-break handling. After the link reference definition [docs]: /manual is consumed, the --- line is no longer a setext heading underline (the preceding block is not a paragraph) and should parse as a thematic break <hr />, giving <hr />\n<p><a href="/manual">docs</a></p>\n. The test instead asserts the --- is literal paragraph text. If cmark-gfm truly emits the literal form, this test is documenting a non-spec behavior; either way the expectation should be verified against the parser output, since it does not match the reference rendering.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/markdown/markdown_links_test.cc, line 206:

<comment>This expectation contradicts CommonMark thematic-break handling. After the link reference definition `[docs]: /manual` is consumed, the `---` line is no longer a setext heading underline (the preceding block is not a paragraph) and should parse as a thematic break `<hr />`, giving `<hr />\n<p><a href="/manual">docs</a></p>\n`. The test instead asserts the `---` is literal paragraph text. If cmark-gfm truly emits the literal form, this test is documenting a non-spec behavior; either way the expectation should be verified against the parser output, since it does not match the reference rendering.</comment>

<file context>
@@ -0,0 +1,589 @@
+
+TEST(link_reference_definition_followed_by_dashes) {
+  const auto result{
+      sourcemeta::core::markdown_to_html("[docs]: /manual\n---\n[docs]")};
+  EXPECT_EQ(result, "<p>---\n"
+                    "<a href=\"/manual\">docs</a></p>\n");
</file context>
Suggested change
sourcemeta::core::markdown_to_html("[docs]: /manual\n---\n[docs]")};
EXPECT_EQ(result, "<p>---\n"
const auto result{sourcemeta::core::markdown_to_html("[docs]: /manual\n---\n[docs]")};
EXPECT_EQ(result, "<hr />\n<p><a href=\"/manual\">docs</a></p>\n");

@jviotti
jviotti merged commit fa8033d into main Sep 14, 2026
14 checks passed
@jviotti
jviotti deleted the markdown-more branch September 14, 2026 20:28

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (macos/llvm)

Details
Benchmark suite Current: 8af23fc Previous: 5bffbb3 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.9595080914200855 ns/iter 2.0421361249254413 ns/iter 0.96
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.8508496210126286 ns/iter 2.089879276156218 ns/iter 0.89
Regex_Period_Asterisk 1.7872658661420011 ns/iter 2.111575724880253 ns/iter 0.85
Regex_Group_Period_Asterisk_Group 1.854131226428955 ns/iter 2.034158291384116 ns/iter 0.91
Regex_Period_Plus 2.1772414195915353 ns/iter 2.4310404812832984 ns/iter 0.90
Regex_Period 2.145953090802979 ns/iter 2.360852661683114 ns/iter 0.91
Regex_Caret_Period_Plus_Dollar 2.4472228479134523 ns/iter 2.5333197482816803 ns/iter 0.97
Regex_Caret_Group_Period_Plus_Group_Dollar 2.055741499742005 ns/iter 2.827605188915669 ns/iter 0.73
Regex_Caret_Period_Asterisk_Dollar 1.811998394983905 ns/iter 2.196829674053169 ns/iter 0.82
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.2102099943824025 ns/iter 2.5260335252767936 ns/iter 0.87
Regex_Caret_X_Hyphen 6.891897820160137 ns/iter 7.578146568648614 ns/iter 0.91
Regex_Period_Md_Dollar 26.223965899492853 ns/iter 25.48467243154449 ns/iter 1.03
Regex_Caret_Slash_Period_Asterisk 6.355560725737846 ns/iter 6.6128608045985775 ns/iter 0.96
Regex_Caret_Period_Range_Dollar 2.3732329649822246 ns/iter 2.4384942705145196 ns/iter 0.97
Regex_Nested_Backtrack 58.40138379977833 ns/iter 35.231985077258805 ns/iter 1.66
JSON_Array_Of_Objects_Unique 625.1890885190331 ns/iter 483.3497272927505 ns/iter 1.29
JSON_Parse_1 5645.351064896388 ns/iter 4647.721896601699 ns/iter 1.21
JSON_Parse_Real 8961.02808602209 ns/iter 7323.020515300921 ns/iter 1.22
JSON_Parse_Decimal 9299.939940222133 ns/iter 7686.01565855602 ns/iter 1.21
JSON_Parse_Schema_ISO_Language 3339230.3165824367 ns/iter 3377981.561946608 ns/iter 0.99
JSON_Parse_Integer 3947.583450324601 ns/iter 6338.849754837888 ns/iter 0.62
JSON_Parse_String_NonSSO_Plain 4475.212924017382 ns/iter 4589.973997330007 ns/iter 0.97
JSON_Parse_String_SSO_Plain 2527.0176468232044 ns/iter 2279.137233569705 ns/iter 1.11
JSON_Parse_String_Escape_Heavy 25347.517275062703 ns/iter 21568.711088502812 ns/iter 1.18
JSON_Parse_Object_Short_Keys 8703.317164762235 ns/iter 7479.379220409234 ns/iter 1.16
JSON_Parse_Object_Scalar_Properties 3910.025242437088 ns/iter 3363.066535128865 ns/iter 1.16
JSON_Parse_Object_Array_Properties 5602.513899559446 ns/iter 3998.6331426636457 ns/iter 1.40
JSON_Parse_Object_Object_Properties 5863.067452241787 ns/iter 4051.6219984502727 ns/iter 1.45
JSON_Parse_Nested_Containers 31474.45510524213 ns/iter 30978.404577264686 ns/iter 1.02
JSON_From_String_Copy 13.660586087050726 ns/iter 13.534766884325878 ns/iter 1.01
JSON_From_String_Temporary 7.702610294380739 ns/iter 7.4451545517609174 ns/iter 1.03
JSON_Number_To_Double 39.606349212019346 ns/iter 37.12301803551041 ns/iter 1.07
JSON_Object_At_Last_Key/8 4.671244433550973 ns/iter 5.955758925218632 ns/iter 0.78
JSON_Object_At_Last_Key/32 16.042988301223104 ns/iter 17.30855859891771 ns/iter 0.93
JSON_Object_At_Last_Key/128 68.01925733527308 ns/iter 68.04436879462388 ns/iter 1.00
JSON_Object_At_Last_Key/512 256.72605684868995 ns/iter 254.82551658083446 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 76.79309457671982 ns/iter 75.40912593681868 ns/iter 1.02
JSON_Equality_Helm_Chart_Lock 232.69220858586473 ns/iter 208.95540461291557 ns/iter 1.11
JSON_Divisible_By_Decimal 204.38806889124746 ns/iter 235.83192162413394 ns/iter 0.87
JSON_String_Equal/10 7.974400195823342 ns/iter 8.361572076597634 ns/iter 0.95
JSON_String_Equal/100 7.158045823743737 ns/iter 8.728191569044409 ns/iter 0.82
JSON_String_Equal_Small_By_Perfect_Hash/10 0.3788832171689163 ns/iter 0.40306074647841794 ns/iter 0.94
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.8062322784770353 ns/iter 4.065974423102809 ns/iter 0.94
JSON_String_Fast_Hash/10 2.881454536735214 ns/iter 2.795881093565554 ns/iter 1.03
JSON_String_Fast_Hash/100 2.3985751374838764 ns/iter 2.956851607142082 ns/iter 0.81
JSON_String_Key_Hash/10 2.3379676106812393 ns/iter 2.1293826472878106 ns/iter 1.10
JSON_String_Key_Hash/100 3.032113821619061 ns/iter 2.6245616127750013 ns/iter 1.16
JSON_Object_Defines_Miss_Same_Length 3.7071897665977303 ns/iter 3.2395820188797533 ns/iter 1.14
JSON_Object_Defines_Miss_Too_Small 3.7027574709366347 ns/iter 3.4134431516202564 ns/iter 1.08
JSON_Object_Defines_Miss_Too_Large 3.29518331420512 ns/iter 3.153323206058429 ns/iter 1.04
Pointer_Object_Traverse 27.336174458519245 ns/iter 23.339539238042324 ns/iter 1.17
Pointer_Object_Try_Traverse 51.18229295621411 ns/iter 40.42126193478165 ns/iter 1.27
Pointer_Push_Back_Pointer_To_Weak_Pointer 179.626795755538 ns/iter 152.71922247951738 ns/iter 1.18
Pointer_Walker_Schema_ISO_Language 1928495.4086017893 ns/iter 1778517.0731707604 ns/iter 1.08
Pointer_Maybe_Tracked_Deeply_Nested/0 1159570.7547167826 ns/iter 934336.2532187408 ns/iter 1.24
Pointer_Maybe_Tracked_Deeply_Nested/1 1464630.863636132 ns/iter 1259648.6730769032 ns/iter 1.16
Pointer_Position_Tracker_Get_Deeply_Nested 608.3882079999512 ns/iter 490.0584985099072 ns/iter 1.24
Schema_Tracker_ISO_Language 4027807.3248405266 ns/iter 3153527.2606389453 ns/iter 1.28
Schema_Tracker_ISO_Language_To_JSON 19628150.000001673 ns/iter 12450410.807017313 ns/iter 1.58
Schema_Frame_WoT_References 4259194.170000455 ns/iter 2468263.0490562315 ns/iter 1.73
Schema_Frame_OMC_References 13968460.062500298 ns/iter 15876931.884616414 ns/iter 0.88
Schema_Frame_OMC_Pointers 27299235.00000041 ns/iter 30126839.06896702 ns/iter 0.91
Schema_Frame_OMC_Locations 11138968.253969021 ns/iter 11619460.130433531 ns/iter 0.96
Schema_Frame_ISO_Language_Locations 29816019.124998167 ns/iter 32657744.047626346 ns/iter 0.91
Schema_Frame_ISO_Language_Root 134.6448774714855 ns/iter 145.75882892304142 ns/iter 0.92
Schema_Frame_KrakenD_References 18186087.500004075 ns/iter 19274928.911767453 ns/iter 0.94
Schema_Frame_KrakenD_Reachable 199104263.99997053 ns/iter 203517344.00009036 ns/iter 0.98
Schema_Frame_ISO_Language_Locations_To_JSON 25480762.93103428 ns/iter 30109740.384616017 ns/iter 0.85
Schema_Frame_Many_Resources_References 109389590.16668074 ns/iter 189180971.99995527 ns/iter 0.58
Schema_Frame_Deeply_Nested_References 12724275.166670889 ns/iter 15262773.365853585 ns/iter 0.83
JSONPath_Descendant_Filter_Nested 1331.706519361521 ns/iter 1454.405509762566 ns/iter 0.92
URITemplateRouter_Create 24467.374813784725 ns/iter 20260.132072477045 ns/iter 1.21
URITemplateRouter_Match 231.75166112788497 ns/iter 215.43584292658994 ns/iter 1.08
URITemplateRouter_Match_BasePath 248.23908528555782 ns/iter 231.5818257160856 ns/iter 1.07
URITemplateRouterView_Restore 13839.776344868596 ns/iter 12586.052030759864 ns/iter 1.10
URITemplateRouterView_Match 153.24189452841208 ns/iter 161.64377427086964 ns/iter 0.95
URITemplateRouterView_Match_BasePath 183.09620973174668 ns/iter 176.90263108547143 ns/iter 1.04
URITemplateRouterView_Arguments 648.9500534709116 ns/iter 896.6953020990101 ns/iter 0.72
JSONL_Parse_Large 7490436.25000013 ns/iter 10378904.757141884 ns/iter 0.72
JSONL_Parse_Large_GZIP 7030697.818181304 ns/iter 11101229.161289256 ns/iter 0.63
JSONLD_Catalog_Annotation_List_Populate 528844.1231342987 ns/iter 1778897.6190475961 ns/iter 0.30
JSONLD_Catalog_Materialize 2699626.555970248 ns/iter 3293019.2819150006 ns/iter 0.82
HTML_Build_Table_100000 53987002.470581934 ns/iter 46758197.20000618 ns/iter 1.15
HTML_Render_Table_100000 2563073.430327431 ns/iter 2054029.0917157626 ns/iter 1.25
Markdown_To_HTML_Realistic_Document 12908801.28846521 ns/iter
Markdown_To_HTML_Pathological 70784505.25000335 ns/iter
GZIP_Compress_ISO_Language_Set_3_Locations 37419572.19999676 ns/iter 32361996.04761428 ns/iter 1.16
GZIP_Decompress_ISO_Language_Set_3_Locations 3359633.6462261756 ns/iter 3462806.216931606 ns/iter 0.97
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 5366936.249999981 ns/iter 5110880.167883169 ns/iter 1.05
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 6809618.0526309945 ns/iter 6231360.360360512 ns/iter 1.09
GZIP_Compress_ISO_Language_Set_3_Schema 1948301.5827580825 ns/iter 2120909.5518292165 ns/iter 0.92
GZIP_Decompress_ISO_Language_Set_3_Schema 385550.8713136979 ns/iter 359615.49566887866 ns/iter 1.07
JOSE_VerifySignature_RS256 24938.856018776965 ns/iter 25738.8784265626 ns/iter 0.97
JOSE_VerifySignature_ES512 1143011.2399405458 ns/iter 1320944.6239871269 ns/iter 0.87
CRYPTO_CRC32_Large_JSONL 25085.937408389556 ns/iter 23952.691699243624 ns/iter 1.05

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant