Fossil

Check-in [adbb0b9255]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the printf() %W and %!W conversions so that they can both be used during the same Fossil run.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: adbb0b9255e36fc0cfe0f9019bd4dac5d4da3b56c0b42348cd1d3d00d63ccd9c
User & Date: drh 2025-03-03 23:23:04.879
Context
2025-03-04
03:48
Rebuild pikchr wasm/js. For reasons beyond my ken, the [c32f97e9e] build was rendering correctly (as per that fix) in legacy mode but not wasm mode. check-in: 316b0a689b user: stephan tags: trunk
00:39
Proof-of-concept code that allows markdown-style hyperlinks to appear in check-in comments. Markdown-style hyperlinks are not allowed in ordinary text/x-fossil-wiki for backwards compatibility. This simply change reduces the need to provide full markdown support for check-in comments. check-in: e7bc33f080 user: drh tags: comment-markdown-links
2025-03-03
23:23
Fix the printf() %W and %!W conversions so that they can both be used during the same Fossil run. check-in: adbb0b9255 user: drh tags: trunk
20:57
Bug fix in pikchr. check-in: c32f97e9e4 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/printf.c.
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269





270

271
272
273
274
275
276
277
** flags) and is false for plain "%W".  The ! indicates that the text is
** to be rendered on a form rather than the timeline and that block markup
** is acceptable even if the "timeline-block-markup" setting is false.
*/
static int wiki_convert_flags(int altForm2){
  static int wikiFlags = 0;
  if( wikiFlags==0 ){
    if( altForm2 || db_get_boolean("timeline-block-markup", 0) ){
      wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
    }else{
      wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
    }
    if( db_get_boolean("timeline-plaintext", 0) ){
      wikiFlags |= WIKI_LINKSONLY;
    }
    if( db_get_boolean("timeline-hard-newlines", 0) ){
      wikiFlags |= WIKI_NEWLINE;
    }
  }





  return wikiFlags;

}



/*
** The root program.  All variations call this core.
**







|











>
>
>
>
>
|
>







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
** flags) and is false for plain "%W".  The ! indicates that the text is
** to be rendered on a form rather than the timeline and that block markup
** is acceptable even if the "timeline-block-markup" setting is false.
*/
static int wiki_convert_flags(int altForm2){
  static int wikiFlags = 0;
  if( wikiFlags==0 ){
    if( db_get_boolean("timeline-block-markup", 0) ){
      wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
    }else{
      wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
    }
    if( db_get_boolean("timeline-plaintext", 0) ){
      wikiFlags |= WIKI_LINKSONLY;
    }
    if( db_get_boolean("timeline-hard-newlines", 0) ){
      wikiFlags |= WIKI_NEWLINE;
    }
  }
  if( altForm2 ){
    /* block markup (ex: <p>, <table>) allowed */
    return  wikiFlags & ~WIKI_NOBLOCK;
  }else{
    /* Do not allow any block format.  Everything in a <span> */
    return wikiFlags;
  }
}



/*
** The root program.  All variations call this core.
**