Fossil SCM

The CLI timeline now takes into account timeline formatting settings, timeline-plaintext and timeline-hard-newlines, when rendering.

drh 2025-03-23 10:29 trunk
Commit 7e1c569b637d0eebec994323cc1d015aeeb1222c10f7bd67290aee0e21558bf0
1 file changed +4 -2
+4 -2
--- src/timeline.c
+++ src/timeline.c
@@ -3419,11 +3419,13 @@
34193419
}
34203420
34213421
/*
34223422
** wiki_to_text(TEXT)
34233423
**
3424
-** Return a plain-text rendering of Fossil-Wiki TEXT.
3424
+** Return a text rendering of Fossil-Wiki TEXT, intended for display
3425
+** on a timeline. The timeline-plaintext and timeline-hard-newlines
3426
+** settings are considered when doing this rendering.
34253427
*/
34263428
static void wiki_to_text_sqlfunc(
34273429
sqlite3_context *context,
34283430
int argc,
34293431
sqlite3_value **argv
@@ -3434,11 +3436,11 @@
34343436
zIn = (const char*)sqlite3_value_text(argv[0]);
34353437
if( zIn==0 ) return;
34363438
nIn = sqlite3_value_bytes(argv[0]);
34373439
blob_init(&in, zIn, nIn);
34383440
blob_init(&html, 0, 0);
3439
- wiki_convert(&in, &html, WIKI_INLINE);
3441
+ wiki_convert(&in, &html, wiki_convert_flags(0));
34403442
blob_reset(&in);
34413443
blob_init(&txt, 0, 0);
34423444
html_to_plaintext(blob_str(&html), &txt, 0);
34433445
blob_reset(&html);
34443446
nOut = blob_size(&txt);
34453447
--- src/timeline.c
+++ src/timeline.c
@@ -3419,11 +3419,13 @@
3419 }
3420
3421 /*
3422 ** wiki_to_text(TEXT)
3423 **
3424 ** Return a plain-text rendering of Fossil-Wiki TEXT.
 
 
3425 */
3426 static void wiki_to_text_sqlfunc(
3427 sqlite3_context *context,
3428 int argc,
3429 sqlite3_value **argv
@@ -3434,11 +3436,11 @@
3434 zIn = (const char*)sqlite3_value_text(argv[0]);
3435 if( zIn==0 ) return;
3436 nIn = sqlite3_value_bytes(argv[0]);
3437 blob_init(&in, zIn, nIn);
3438 blob_init(&html, 0, 0);
3439 wiki_convert(&in, &html, WIKI_INLINE);
3440 blob_reset(&in);
3441 blob_init(&txt, 0, 0);
3442 html_to_plaintext(blob_str(&html), &txt, 0);
3443 blob_reset(&html);
3444 nOut = blob_size(&txt);
3445
--- src/timeline.c
+++ src/timeline.c
@@ -3419,11 +3419,13 @@
3419 }
3420
3421 /*
3422 ** wiki_to_text(TEXT)
3423 **
3424 ** Return a text rendering of Fossil-Wiki TEXT, intended for display
3425 ** on a timeline. The timeline-plaintext and timeline-hard-newlines
3426 ** settings are considered when doing this rendering.
3427 */
3428 static void wiki_to_text_sqlfunc(
3429 sqlite3_context *context,
3430 int argc,
3431 sqlite3_value **argv
@@ -3434,11 +3436,11 @@
3436 zIn = (const char*)sqlite3_value_text(argv[0]);
3437 if( zIn==0 ) return;
3438 nIn = sqlite3_value_bytes(argv[0]);
3439 blob_init(&in, zIn, nIn);
3440 blob_init(&html, 0, 0);
3441 wiki_convert(&in, &html, wiki_convert_flags(0));
3442 blob_reset(&in);
3443 blob_init(&txt, 0, 0);
3444 html_to_plaintext(blob_str(&html), &txt, 0);
3445 blob_reset(&html);
3446 nOut = blob_size(&txt);
3447

Keyboard Shortcuts

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