Changes On Branch full-html-for-embedded-docs
Not logged in

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

Changes In Branch full-html-for-embedded-docs Excluding Merge-Ins

This is equivalent to a diff from 2116906fb1 to 463df97c06

2012-10-19
18:36
Add a mention of the ability to do dynamic loading of Tcl to the change log. (This change originally checked into the wrong branch.) check-in: e40e4faabb user: drh tags: trunk
18:33
All submenu buttons on embedded documentation pages using markup of the form: <a class="button" href="...">LABEL</a>. check-in: 563b3ccb7b user: drh tags: embedded-doc-buttons
17:34
Simple changes that allows embedded documentation *.wiki files to contain unrestricted HTML. This is on a branch because I don't believe we want to go this way, but I might change my mind later. Leaf check-in: 463df97c06 user: drh tags: full-html-for-embedded-docs
17:04
Fix a typo in the Style document. check-in: 2116906fb1 user: drh tags: trunk
15:29
Further edits to the change log for 1.24. check-in: 5ea7a3ec56 user: drh tags: trunk

Changes to src/doc.c.

487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
                                     "  FROM blob WHERE rid=%d", vid));
  Th_Store("doc_date", db_text(0, "SELECT datetime(mtime) FROM event"
                                  " WHERE objid=%d AND type='ci'", vid));
  if( fossil_strcmp(zMime, "application/x-fossil-wiki")==0 ){
    Blob title, tail;
    if( wiki_find_title(&filebody, &title, &tail) ){
      style_header(blob_str(&title));
      wiki_convert(&tail, 0, 0);
    }else{
      style_header("Documentation");
      wiki_convert(&filebody, 0, 0);
    }
    style_footer();
  }else if( fossil_strcmp(zMime, "text/plain")==0 ){
    style_header("Documentation");
    @ <blockquote><pre>
    @ %h(blob_str(&filebody))
    @ </pre></blockquote>






|


|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
                                     "  FROM blob WHERE rid=%d", vid));
  Th_Store("doc_date", db_text(0, "SELECT datetime(mtime) FROM event"
                                  " WHERE objid=%d AND type='ci'", vid));
  if( fossil_strcmp(zMime, "application/x-fossil-wiki")==0 ){
    Blob title, tail;
    if( wiki_find_title(&filebody, &title, &tail) ){
      style_header(blob_str(&title));
      wiki_convert(&tail, 0, WIKI_FULL_HTML);
    }else{
      style_header("Documentation");
      wiki_convert(&filebody, 0, WIKI_FULL_HTML);
    }
    style_footer();
  }else if( fossil_strcmp(zMime, "text/plain")==0 ){
    style_header("Documentation");
    @ <blockquote><pre>
    @ %h(blob_str(&filebody))
    @ </pre></blockquote>

Changes to src/wikiformat.c.

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
....
1157
1158
1159
1160
1161
1162
1163

1164
1165
1166
1167
1168
1169
1170
....
1316
1317
1318
1319
1320
1321
1322




1323
1324
1325
1326
1327
1328
1329
#include "wikiformat.h"

#if INTERFACE
/*
** Allowed wiki transformation operations
*/
#define WIKI_NOFOLLOW       0x001
#define WIKI_HTML           0x002
#define WIKI_INLINE         0x004  /* Do not surround with <p>..</p> */
#define WIKI_NOBLOCK        0x008  /* No block markup of any kind */
#endif


/*
** These are the only markup attributes allowed.
................................................................................
*/
static void wiki_render(Renderer *p, char *z){
  int tokenType;
  ParsedMarkup markup;
  int n;
  int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0;
  int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0;

  char *zOrig = z;

  /* Make sure the attribute constants and names still align
  ** following changes in the attribute list. */
  assert( fossil_strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 );

  while( z[0] ){
................................................................................
      case TOKEN_RAW: {
        blob_append(p->pOut, z, n);
        break;
      }
      case TOKEN_MARKUP: {
        const char *zId;
        int iDiv;




        parseMarkup(&markup, z);

        /* Markup of the form </div id=ID> where there is a matching
        ** ID somewhere on the stack.  Exit the verbatim if were are in
        ** it.  Pop the stack up to the matching <div>.  Discard the
        ** </div>
        */






|







 







>







 







>
>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
....
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
....
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
#include "wikiformat.h"

#if INTERFACE
/*
** Allowed wiki transformation operations
*/
#define WIKI_NOFOLLOW       0x001
#define WIKI_FULL_HTML      0x002  /* Allow unrestricted HTML */
#define WIKI_INLINE         0x004  /* Do not surround with <p>..</p> */
#define WIKI_NOBLOCK        0x008  /* No block markup of any kind */
#endif


/*
** These are the only markup attributes allowed.
................................................................................
*/
static void wiki_render(Renderer *p, char *z){
  int tokenType;
  ParsedMarkup markup;
  int n;
  int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0;
  int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0;
  int fullHtml = (p->state & WIKI_FULL_HTML)!=0;
  char *zOrig = z;

  /* Make sure the attribute constants and names still align
  ** following changes in the attribute list. */
  assert( fossil_strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 );

  while( z[0] ){
................................................................................
      case TOKEN_RAW: {
        blob_append(p->pOut, z, n);
        break;
      }
      case TOKEN_MARKUP: {
        const char *zId;
        int iDiv;
        if( fullHtml ){
          blob_append(p->pOut, z, n);
          break;
        }
        parseMarkup(&markup, z);

        /* Markup of the form </div id=ID> where there is a matching
        ** ID somewhere on the stack.  Exit the verbatim if were are in
        ** it.  Pop the stack up to the matching <div>.  Discard the
        ** </div>
        */