Changeset 329

Show
Ignore:
Timestamp:
06/05/08 19:39:42 (3 months ago)
Author:
geiseri
Message:

started on table support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/MyPoint/example/wiki.mypoint

    r305 r329  
    2525   * point 1.3.1 
    2626 * point 2 
     27---- 
     28== Title 4 == 
     29|| foo || bar || baz || 
     30|| foo || bar || baz || 
     31|| foo || bar || baz || 
  • projects/MyPoint/src/simpleparser.cpp

    r327 r329  
    2424#include <QStack> 
    2525 
     26#include <qdebug.h> 
     27 
    2628SimpleParser::SimpleParser() 
    2729{ 
     
    4446        QRegExp date("\\{\\{date:([^\\}]+)\\}\\}"); 
    4547        QRegExp footer("\\{\\{footer:([^\\}]+)\\}\\}"); 
    46 //      QRegExp bullet1("^[\\s]{1}[*]([^\n]+)"); 
    47 //      QRegExp bullet2("^[\\s]{3}[*]([^\n]+)"); 
    48 //      QRegExp bullet3("^[\\s]{5}[*]([^\n]+)"); 
    49 //      QRegExp bullet4("^[\\s]{7}[*]([^\n]+)"); 
    50 //      QRegExp bullet5("^[\\s]{9}[*]([^\n]+)"); 
    51 //      QRegExp bullet("^([\\s]{1,9})[*]([^\n]+)"); 
    52  
     48        QRegExp tableDelimiter("\\|\\| ((.(?!\\|\\|))+)"); 
     49         
    5350        Presentation *presentation = new Presentation; 
    5451        bool firstPage = true; 
     
    113110                { 
    114111                        presentation->setDate( date.cap(1) ); 
     112                } 
     113                else if( line.contains(tableDelimiter) && !firstPage ) 
     114                { 
     115                        QStringList cells = line.split( "||" , QString::SkipEmptyParts); 
     116                        qDebug() << cells; 
    115117                } 
    116118                else if( direction( line, &captureText ) )