Fossil

Check-in [cacb8db3]
Login

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

Overview
Comment:Minor fixes to creole
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | creole
Files: files | file ages | folders
SHA1:cacb8db398981c501f4624967b9a1094c2a38db5
User & Date: robert 2009-09-26 14:33:22
Context
2009-10-05
10:08
merge trunk into creole check-in: 651c75c5 user: robert tags: creole
2009-09-26
14:33
Minor fixes to creole check-in: cacb8db3 user: robert tags: creole
08:17
Clean up and merge updates from trunk check-in: 7a39dde2 user: robert tags: creole
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#    will run on the target platform.  This is usually the same
#    as BCC, unless you are cross-compiling.  This C compiler builds
#    the finished binary for fossil.  The BCC compiler above is used
#    for building intermediate code-generator tools.
#
#TCC = gcc -O6
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
TCC = gcc -g -Os -Wall

#### Extra arguments for linking the finished binary.  Fossil needs
#    to link against the Z-Lib compression library.  There are no
#    other dependencies.  We sometimes add the -static option here
#    so that we can build a static executable that will run in a
#    chroot jail.
#







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#    will run on the target platform.  This is usually the same
#    as BCC, unless you are cross-compiling.  This C compiler builds
#    the finished binary for fossil.  The BCC compiler above is used
#    for building intermediate code-generator tools.
#
#TCC = gcc -O6
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
TCC = gcc  -Os 

#### Extra arguments for linking the finished binary.  Fossil needs
#    to link against the Z-Lib compression library.  There are no
#    other dependencies.  We sometimes add the -static option here
#    so that we can build a static executable that will run in a
#    chroot jail.
#

Changes to src/creoleparser.c.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
...
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
...
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
...
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
    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;
}
................................................................................
  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;
................................................................................

  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;

................................................................................
  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){//{{{







|







 







|







 







<
|
|







 







|







360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
...
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
...
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419
420
...
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
    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;
}
................................................................................
  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;
................................................................................

  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;

................................................................................
  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){//{{{

Changes to src/style.c.

414
415
416
417
418
419
420
421
422


423
424
425
426
427
428
429
430
431
432
433
434
@ .creoletable * tr td {
@   padding: .4em .7em .45em .7em;
@   border-left: 1px solid #D9D9D9;
@   border-top: 1px solid #D9D9D9;
@   vertical-align: center;
@   empty-cells: show;
@ }
@ .creole-nowiki {
@   background: oldlace;


@ }
@ .creole-inline-nowiki {
@   background: oldlace;
@ }
@ .creole-image {
@   color:green;
@   border:1px solid green;
@ }
@ .creole-nomacro {
@   color:red;
@   border:1px solid red;
@ }







|

>
>




|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
@ .creoletable * tr td {
@   padding: .4em .7em .45em .7em;
@   border-left: 1px solid #D9D9D9;
@   border-top: 1px solid #D9D9D9;
@   vertical-align: center;
@   empty-cells: show;
@ }
@ .creole-block-nowiki {
@   background: oldlace;
@   margin: 2em;
@   overflow: auto;
@ }
@ .creole-inline-nowiki {
@   background: oldlace;
@ }
@ .creole-noimage {
@   color:green;
@   border:1px solid green;
@ }
@ .creole-nomacro {
@   color:red;
@   border:1px solid red;
@ }