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

Changes to src/wikiformat.c.

    22     22   #include "wikiformat.h"
    23     23   
    24     24   #if INTERFACE
    25     25   /*
    26     26   ** Allowed wiki transformation operations
    27     27   */
    28     28   #define WIKI_NOFOLLOW       0x001
    29         -#define WIKI_HTML           0x002
           29  +#define WIKI_FULL_HTML      0x002  /* Allow unrestricted HTML */
    30     30   #define WIKI_INLINE         0x004  /* Do not surround with <p>..</p> */
    31     31   #define WIKI_NOBLOCK        0x008  /* No block markup of any kind */
    32     32   #endif
    33     33   
    34     34   
    35     35   /*
    36     36   ** These are the only markup attributes allowed.
................................................................................
  1157   1157   */
  1158   1158   static void wiki_render(Renderer *p, char *z){
  1159   1159     int tokenType;
  1160   1160     ParsedMarkup markup;
  1161   1161     int n;
  1162   1162     int inlineOnly = (p->state & INLINE_MARKUP_ONLY)!=0;
  1163   1163     int wikiUseHtml = (p->state & WIKI_USE_HTML)!=0;
         1164  +  int fullHtml = (p->state & WIKI_FULL_HTML)!=0;
  1164   1165     char *zOrig = z;
  1165   1166   
  1166   1167     /* Make sure the attribute constants and names still align
  1167   1168     ** following changes in the attribute list. */
  1168   1169     assert( fossil_strcmp(aAttribute[ATTR_WIDTH].zName, "width")==0 );
  1169   1170   
  1170   1171     while( z[0] ){
................................................................................
  1316   1317         case TOKEN_RAW: {
  1317   1318           blob_append(p->pOut, z, n);
  1318   1319           break;
  1319   1320         }
  1320   1321         case TOKEN_MARKUP: {
  1321   1322           const char *zId;
  1322   1323           int iDiv;
         1324  +        if( fullHtml ){
         1325  +          blob_append(p->pOut, z, n);
         1326  +          break;
         1327  +        }
  1323   1328           parseMarkup(&markup, z);
  1324   1329   
  1325   1330           /* Markup of the form </div id=ID> where there is a matching
  1326   1331           ** ID somewhere on the stack.  Exit the verbatim if were are in
  1327   1332           ** it.  Pop the stack up to the matching <div>.  Discard the
  1328   1333           ** </div>
  1329   1334           */