Diff
Not logged in

Differences From Artifact [b4e5a00d65]:

To Artifact [f0d98d79e8]:


265
266
267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
** In other words, newlines are coverted into <br> for HTML display.
** The default behavior, when this setting is off, is that newlines are
** treated like any other whitespace character.
*/

/*
** Return an appropriate set of flags for wiki_convert() for displaying
** comments on a timeline.  These flag settings are determined by
** configuration parameters.
**
** The altForm2 argument is true for "%!W" (with the "!" alternate-form-2

** 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;
      wikiFlags &= ~WIKI_MARKDOWN_INLINE;
    }else{
      int x = db_get_int("timeline-markdown", 0);
      if( x & 1 ) wikiFlags |= WIKI_MARKDOWN_LINK;
      if( x & 2 ) wikiFlags |= WIKI_MARKDOWN_FONT;
    }
    if( db_get_boolean("timeline-hard-newlines", 0) ){
      wikiFlags |= WIKI_NEWLINE;
    }
  }
  if( altForm2 ){
    /* block markup (ex: <p>, <table>) allowed */







|
|

|
>
|
<
<










|

<
<
<
<







265
266
267
268
269
270
271
272
273
274
275
276
277


278
279
280
281
282
283
284
285
286
287
288
289




290
291
292
293
294
295
296
** In other words, newlines are coverted into <br> for HTML display.
** The default behavior, when this setting is off, is that newlines are
** treated like any other whitespace character.
*/

/*
** Return an appropriate set of flags for wiki_convert() for displaying
** check-in comments on a timeline (%W) or for general display (%!W).
** The flags are determined by settings.
**
** The altForm2 argument is true for "%!W" (indicating that the rendered
** wiki text is for general display) and false for "%W" (indicating that
** the text is being displayed in a timeline.


*/
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 | WIKI_OVERRIDE;
      wikiFlags &= ~WIKI_MARKDOWN_INLINE;




    }
    if( db_get_boolean("timeline-hard-newlines", 0) ){
      wikiFlags |= WIKI_NEWLINE;
    }
  }
  if( altForm2 ){
    /* block markup (ex: <p>, <table>) allowed */