Fossil SCM

Stop allowing whitespace between the closing paranthesis and opening bracket in inline links, as this is forbidden by the CommonMark spec. See [forum:1d0bf6d9df|forumpost 1d0bf6d9df].

danield 2026-10-21 12:09 UTC trunk
Commit 852e7b61b6ca874f362ee52761eddaec2e60ef10b59a04a9c4cbffd5dd7cc59b
1 file changed +2
--- src/markdown.c
+++ src/markdown.c
@@ -1484,11 +1484,13 @@
14841484
}else{
14851485
fn.nUsed = 0;
14861486
14871487
/* skip "inter-bracket-whitespace" - any amount of whitespace or newline */
14881488
/* (this is much more lax than original markdown syntax) */
1489
+ /* --> Commented out on 2026-10-21 in response to forum post 1d0bf6d9df
14891490
while( i<size && (data[i]==' ' || data[i]=='\t' || data[i]=='\n') ){ i++; }
1491
+ */
14901492
14911493
/* allocate temporary buffers to store content, link and title */
14921494
title = new_work_buffer(rndr);
14931495
content = new_work_buffer(rndr);
14941496
link = new_work_buffer(rndr);
14951497
--- src/markdown.c
+++ src/markdown.c
@@ -1484,11 +1484,13 @@
1484 }else{
1485 fn.nUsed = 0;
1486
1487 /* skip "inter-bracket-whitespace" - any amount of whitespace or newline */
1488 /* (this is much more lax than original markdown syntax) */
 
1489 while( i<size && (data[i]==' ' || data[i]=='\t' || data[i]=='\n') ){ i++; }
 
1490
1491 /* allocate temporary buffers to store content, link and title */
1492 title = new_work_buffer(rndr);
1493 content = new_work_buffer(rndr);
1494 link = new_work_buffer(rndr);
1495
--- src/markdown.c
+++ src/markdown.c
@@ -1484,11 +1484,13 @@
1484 }else{
1485 fn.nUsed = 0;
1486
1487 /* skip "inter-bracket-whitespace" - any amount of whitespace or newline */
1488 /* (this is much more lax than original markdown syntax) */
1489 /* --> Commented out on 2026-10-21 in response to forum post 1d0bf6d9df
1490 while( i<size && (data[i]==' ' || data[i]=='\t' || data[i]=='\n') ){ i++; }
1491 */
1492
1493 /* allocate temporary buffers to store content, link and title */
1494 title = new_work_buffer(rndr);
1495 content = new_work_buffer(rndr);
1496 link = new_work_buffer(rndr);
1497

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button