Here is an other short patch that enables the use of div elements in the
wiki formatting rules.

For instance the index.wiki beginning could be rewritten from

<p align="center">
<font size="3">
<i>Simple, high-reliability, distributed software configuration
management</i>
</font>
</p>

to

<div class="jumbotron">
Simple, high-reliability, distributed software configuration management
</div>


With .jumbotron defined in the CSS as :

.jumbotron {
  font-size: 3em;
  padding: 30px;
  border-radius: 6px;
  background-color: #eee;
}

In some cases it may help separate content from presentation...
Samuel
@@ -948,9 +948,9 @@
   if( p->nStack ){
     int iCode;
     p->nStack--;
     iCode = p->aStack[p->nStack].iCode;
-    if( iCode!=MARKUP_DIV && p->pOut ){
+    if( p->pOut ){
       blob_appendf(p->pOut, "</%s>", aMarkup[iCode].zName);
     }
   }
 }
@@ -981,9 +981,9 @@
 static void popStackToTag(Renderer *p, int iTag){
   int i;
   for(i=p->nStack-1; i>=0; i--){
     if( p->aStack[i].iCode!=iTag ) continue;
-    if( p->aStack[i].zId ) continue;
+    /* if( p->aStack[i].zId ) continue; */
     break;
   }
   if( i<0 ) return;
   while( p->nStack>i ){
@@ -1482,8 +1482,10 @@
           if( p->inVerbatim ){
             p->inVerbatim = 0;
             p->state = p->preVerbState;
             blob_append(p->pOut, "</pre>", 6);
+          }else{
+            blob_append(p->pOut, "</div>", 6);
           }
           while( p->nStack>iDiv+1 ) popStack(p);
           if( p->aStack[iDiv].allowWiki ){
             p->state |= ALLOW_WIKI;
@@ -1547,8 +1549,9 @@
 
         /* Push <div> markup onto the stack together with the id=ID attribute.
         */
         if( markup.iCode==MARKUP_DIV ){
+          renderMarkup(p->pOut, &markup);
           pushStackWithId(p, markup.iCode, markupId(&markup),
                           (p->state & ALLOW_WIKI)!=0);
         }else
 

<<attachment: samuel_debionne.vcf>>

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to