Fossil

Diff
Login

Differences From Artifact [f8a37ab2ca]:

To Artifact [e5d7a584f0]:


360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    return 0;

  char *s = p->icursor + 3;

  int count = p->iend - p->icursor - 6;
  while (count--){
    if (s[0]=='}' && s[1]=='}' && s[2]=='}' && s[3]!='}'){
      blob_appendf(p->iblob, "<tt style='background:oldlace'>%s</tt>", htmlize(p->icursor + 3, s - p->icursor-3));
      p->icursor = s + 3;
      return 1;
    }
    s++;
  }
  return 0;
}







|







360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    return 0;

  char *s = p->icursor + 3;

  int count = p->iend - p->icursor - 6;
  while (count--){
    if (s[0]=='}' && s[1]=='}' && s[2]=='}' && s[3]!='}'){
      blob_appendf(p->iblob, "<tt class='creole-inline-nowiki'>%s</tt>", htmlize(p->icursor + 3, s - p->icursor-3));
      p->icursor = s + 3;
      return 1;
    }
    s++;
  }
  return 0;
}
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
  char *s = p->icursor + 2;
  char *bar = NULL;

  int count = p->iend - p->icursor - 4;
  while (count--){
    if (s[0]=='}' && s[1]=='}'){
      if (!bar) bar = p->icursor + 2;
      blob_appendf(p->iblob, "<span style='color:green;border:1px solid green;'>%s</span>", htmlize(bar, s - bar ));
      p->icursor = s + 2;
      return 1;
    }
    if (!bar && s[0]=='|') bar=s+1;
    s++;
  }
  return 0;
}
//}}}
static int cr_iMacro(Parser *p){//{{{

  if (p->inLink) return 0;
  if ((p->iend - p->icursor)<3) return 0;

  if (p->icursor[1]!='<') return 0;

  char *s = p->icursor + 2;

  int count = p->iend - p->icursor - 3;
  while (count--){
    blob_appendf(p->iblob, "|~%s|", s,2 );
    if (s[0]=='>' && s[1]=='>'){
      blob_appendf(p->iblob, "<span style='color:red;border:1px solid red;'>%s</span>", htmlize(p->icursor, s - p->icursor + 2));
      p->icursor = s + 2;
      return 1;
    }
    s++;
  }
  return 0;








|




















<
|
|







384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419
420
  char *s = p->icursor + 2;
  char *bar = NULL;

  int count = p->iend - p->icursor - 4;
  while (count--){
    if (s[0]=='}' && s[1]=='}'){
      if (!bar) bar = p->icursor + 2;
      blob_appendf(p->iblob, "<span class='creole-noimage'>%s</span>", htmlize(bar, s - bar ));
      p->icursor = s + 2;
      return 1;
    }
    if (!bar && s[0]=='|') bar=s+1;
    s++;
  }
  return 0;
}
//}}}
static int cr_iMacro(Parser *p){//{{{

  if (p->inLink) return 0;
  if ((p->iend - p->icursor)<3) return 0;

  if (p->icursor[1]!='<') return 0;

  char *s = p->icursor + 2;

  int count = p->iend - p->icursor - 3;
  while (count--){

   if (s[0]=='>' && s[1]=='>'){
      blob_appendf(p->iblob, "<span class='creole-nomacro'>%s</span>", htmlize(p->icursor, s - p->icursor + 2));
      p->icursor = s + 2;
      return 1;
    }
    s++;
  }
  return 0;

737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
  if (node->kind & KIND_TABLE){
    cr_renderTable(p, node);
    return;
  }

  if (node->kind & KIND_NO_WIKI_BLOCK){
    blob_appendf(p->iblob,
      "\n<blockquote style='background:oldlace'><pre>%s</pre></blockquote>\n",
        htmlize( node->start, node->end - node->start)
    );
  }
}
//}}}

static char *cr_findEndOfBlock(Parser *p, char *s, char c){//{{{







|







736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
  if (node->kind & KIND_TABLE){
    cr_renderTable(p, node);
    return;
  }

  if (node->kind & KIND_NO_WIKI_BLOCK){
    blob_appendf(p->iblob,
      "\n<pre class='creole-block-nowiki'>%s</pre>\n",
        htmlize( node->start, node->end - node->start)
    );
  }
}
//}}}

static char *cr_findEndOfBlock(Parser *p, char *s, char c){//{{{