Fossil SCM
This is an attempt to fix the bug in [6d05c66f877888fb|the previous check-in] that caused the commit message to get truncated.
Commit
140c865551e52441187fee8d1f175fd45185996ae3b914b51867a65bd812b05f
Parent
6d05c66f877888f…
1 file changed
+4
-2
+4
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2344,20 +2344,22 @@ | ||
| 2344 | 2344 | "Possible comment formatting error%s:%b\n", |
| 2345 | 2345 | nIssue>1 ? "s" : "", &tmp); |
| 2346 | 2346 | blob_reset(&tmp); |
| 2347 | 2347 | return 1; |
| 2348 | 2348 | }else if( strcspn(zStart,zSpecial)<strlen(zStart) ){ |
| 2349 | - Blob html, txt; | |
| 2349 | + Blob in, html, txt; | |
| 2350 | 2350 | char zGot[16]; |
| 2351 | 2351 | int nGot = 0; |
| 2352 | 2352 | int i; |
| 2353 | 2353 | for(i=0; zSpecial[i]; i++){ |
| 2354 | 2354 | if( strchr(zStart,zSpecial[i]) ) zGot[nGot++] = zSpecial[i]; |
| 2355 | 2355 | } |
| 2356 | 2356 | zGot[nGot] = 0; |
| 2357 | + blob_init(&in, blob_str(pComment), -1); | |
| 2357 | 2358 | blob_init(&html, 0, 0); |
| 2358 | - wiki_convert(pComment, &html, WIKI_INLINE); | |
| 2359 | + wiki_convert(&in, &html, WIKI_INLINE); | |
| 2360 | + blob_reset(&in); | |
| 2359 | 2361 | blob_init(&txt, 0, 0); |
| 2360 | 2362 | html_to_plaintext(blob_str(&html), &txt); |
| 2361 | 2363 | blob_reset(&html); |
| 2362 | 2364 | fossil_print("The comment uses special character%s \"%s\". " |
| 2363 | 2365 | "Does it render as you expect?\n\n ", |
| 2364 | 2366 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2344,20 +2344,22 @@ | |
| 2344 | "Possible comment formatting error%s:%b\n", |
| 2345 | nIssue>1 ? "s" : "", &tmp); |
| 2346 | blob_reset(&tmp); |
| 2347 | return 1; |
| 2348 | }else if( strcspn(zStart,zSpecial)<strlen(zStart) ){ |
| 2349 | Blob html, txt; |
| 2350 | char zGot[16]; |
| 2351 | int nGot = 0; |
| 2352 | int i; |
| 2353 | for(i=0; zSpecial[i]; i++){ |
| 2354 | if( strchr(zStart,zSpecial[i]) ) zGot[nGot++] = zSpecial[i]; |
| 2355 | } |
| 2356 | zGot[nGot] = 0; |
| 2357 | blob_init(&html, 0, 0); |
| 2358 | wiki_convert(pComment, &html, WIKI_INLINE); |
| 2359 | blob_init(&txt, 0, 0); |
| 2360 | html_to_plaintext(blob_str(&html), &txt); |
| 2361 | blob_reset(&html); |
| 2362 | fossil_print("The comment uses special character%s \"%s\". " |
| 2363 | "Does it render as you expect?\n\n ", |
| 2364 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2344,20 +2344,22 @@ | |
| 2344 | "Possible comment formatting error%s:%b\n", |
| 2345 | nIssue>1 ? "s" : "", &tmp); |
| 2346 | blob_reset(&tmp); |
| 2347 | return 1; |
| 2348 | }else if( strcspn(zStart,zSpecial)<strlen(zStart) ){ |
| 2349 | Blob in, html, txt; |
| 2350 | char zGot[16]; |
| 2351 | int nGot = 0; |
| 2352 | int i; |
| 2353 | for(i=0; zSpecial[i]; i++){ |
| 2354 | if( strchr(zStart,zSpecial[i]) ) zGot[nGot++] = zSpecial[i]; |
| 2355 | } |
| 2356 | zGot[nGot] = 0; |
| 2357 | blob_init(&in, blob_str(pComment), -1); |
| 2358 | blob_init(&html, 0, 0); |
| 2359 | wiki_convert(&in, &html, WIKI_INLINE); |
| 2360 | blob_reset(&in); |
| 2361 | blob_init(&txt, 0, 0); |
| 2362 | html_to_plaintext(blob_str(&html), &txt); |
| 2363 | blob_reset(&html); |
| 2364 | fossil_print("The comment uses special character%s \"%s\". " |
| 2365 | "Does it render as you expect?\n\n ", |
| 2366 |