Fossil SCM

When rendering text with TH1 blocks, stop without writing the rest of a block whose script ends with break, continue or return; the source of the block was written to the page.

dmestas 2026-11-22 11:45 UTC small-fixes
Commit 8e21f80cff8037c589ebb83b023186b9cea5d1b735676ae6f1ceaa94875efd52
1 file changed +1 -1
+1 -1
--- src/th_main.c
+++ src/th_main.c
@@ -3002,11 +3002,11 @@
30023002
}
30033003
}
30043004
if( rc==TH_ERROR ){
30053005
zResult = (char*)Th_GetResult(g.interp, &n);
30063006
sendError(pOut,zResult, n, 1);
3007
- }else{
3007
+ }else if( rc==TH_OK ){
30083008
sendText(pOut,z, i, 0);
30093009
}
30103010
Th_SetOutputBlob(origOut);
30113011
return rc;
30123012
}
30133013
--- src/th_main.c
+++ src/th_main.c
@@ -3002,11 +3002,11 @@
3002 }
3003 }
3004 if( rc==TH_ERROR ){
3005 zResult = (char*)Th_GetResult(g.interp, &n);
3006 sendError(pOut,zResult, n, 1);
3007 }else{
3008 sendText(pOut,z, i, 0);
3009 }
3010 Th_SetOutputBlob(origOut);
3011 return rc;
3012 }
3013
--- src/th_main.c
+++ src/th_main.c
@@ -3002,11 +3002,11 @@
3002 }
3003 }
3004 if( rc==TH_ERROR ){
3005 zResult = (char*)Th_GetResult(g.interp, &n);
3006 sendError(pOut,zResult, n, 1);
3007 }else if( rc==TH_OK ){
3008 sendText(pOut,z, i, 0);
3009 }
3010 Th_SetOutputBlob(origOut);
3011 return rc;
3012 }
3013

Keyboard Shortcuts

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