Differences From
Artifact [6da016415d]:
- File
src/wiki.c
— part of check-in
[525816e6d7]
at
2011-11-04 20:37:04
on branch json
— Added configure option --enable-json to enable json features. They are disabled by default.
(user:
json-demo
size: 29639)
[more...]
- File
src/wiki.c
— part of check-in
[96f1975ce2]
at
2012-02-04 21:38:20
on branch trunk
— Add the new colorized diff logic to file and wiki diffs in addition to
version diffs.
(user:
drh
size: 29725)
[more...]
591 591 */
592 592 void wdiff_page(void){
593 593 char *zTitle;
594 594 int rid1, rid2;
595 595 const char *zPageName;
596 596 Manifest *pW1, *pW2 = 0;
597 597 Blob w1, w2, d;
598 + int diffFlags;
598 599
599 600 login_check_credentials();
600 601 rid1 = atoi(PD("a","0"));
601 602 if( !g.perm.History ){ login_needed(); return; }
602 603 if( rid1==0 ) fossil_redirect_home();
603 604 rid2 = atoi(PD("b","0"));
604 605 zPageName = PD("name","");
................................................................................
619 620 if( pW1==0 ) fossil_redirect_home();
620 621 blob_init(&w1, pW1->zWiki, -1);
621 622 blob_zero(&w2);
622 623 if( rid2 && (pW2 = manifest_get(rid2, CFTYPE_WIKI))!=0 ){
623 624 blob_init(&w2, pW2->zWiki, -1);
624 625 }
625 626 blob_zero(&d);
626 - text_diff(&w2, &w1, &d, 5 | DIFF_IGNORE_EOLWS);
627 - @ <pre>
628 - @ %h(blob_str(&d))
629 - @ </pre>
627 + diffFlags = construct_diff_flags(1,0);
628 + text_diff(&w2, &w1, &d, diffFlags | DIFF_HTML | DIFF_LINENO);
629 + @ <div class="udiff">
630 + @ %s(blob_str(&d))
631 + @ </div>
630 632 manifest_destroy(pW1);
631 633 manifest_destroy(pW2);
632 634 style_footer();
633 635 }
634 636
635 637 /*
636 638 ** prepare()s pStmt with a query requesting: