]> projects.mako.cc - wikiq/commitdiff
properly implemented text and comment omission flag
authorErik Garrison <erik@hypervolu.me>
Mon, 11 Oct 2010 17:53:07 +0000 (13:53 -0400)
committerErik Garrison <erik@hypervolu.me>
Mon, 11 Oct 2010 17:53:07 +0000 (13:53 -0400)
wikiq.c

diff --git a/wikiq.c b/wikiq.c
index 74fa484f4ae470d39d4aa0cc525b4f3e0b60b940..ce61af7ff7d51b4500c395d9392450600934dcbb 100644 (file)
--- a/wikiq.c
+++ b/wikiq.c
@@ -325,10 +325,14 @@ charhndl(void* vdata, const XML_Char* s, int len)
             */
             case COMMENT: 
                    // printf("row: comment is %s\n", t);
             */
             case COMMENT: 
                    // printf("row: comment is %s\n", t);
-                    data->rev.comment = store(data->rev.comment, t);
+                    if (data->output_type == FULL) {
+                        data->rev.comment = store(data->rev.comment, t);
+                    }
                     break;
             case TEXT:
                     break;
             case TEXT:
-                   data->rev.text = store(data->rev.text, t);
+                    if (data->output_type == FULL) {
+                        data->rev.text = store(data->rev.text, t);
+                    }
                    break; 
             default: break;
         }
                    break; 
             default: break;
         }
@@ -432,7 +436,7 @@ main(int argc, char *argv[])
     output_type = SIMPLE;
     char c;
 
     output_type = SIMPLE;
     char c;
 
-    while ((c = getopt(argc, argv, "hsd")) != -1)
+    while ((c = getopt(argc, argv, "ht")) != -1)
         switch (c)
         {
             case 'd':
         switch (c)
         {
             case 'd':

Benjamin Mako Hill || Want to submit a patch?