Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnNotePanel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11 by maloninc, Wed Jan 4 03:57:19 2006 UTC revision 1.15 by maloninc, Fri Oct 20 02:00:03 2006 UTC
# Line 138  void mnNotePanel::makeHtml(WikiData* wik Line 138  void mnNotePanel::makeHtml(WikiData* wik
138          exp2.Replace(&htmlText, wxT("<a href=\\1>\\1</a>"));          exp2.Replace(&htmlText, wxT("<a href=\\1>\\1</a>"));
139                    
140          /* [[ ]] */          /* [[ ]] */
141          wxRegEx exp1(wxT("\\[\\[([^\\}]+)\\]\\]"));          wxRegEx exp1(wxT("\\[\\[([^]]+)\\]\\]"));
142          exp1.Replace(&htmlText, wxT("<a href=" MNLINK "\\1>\\1</a>"));          exp1.Replace(&htmlText, wxT("<a href=\"" MNLINK "\\1\">\\1</a>"));
143    
144          /* file://  */            /* file://  */  
145          wxRegEx exp3(wxT("(file://[^ ]+)"), wxRE_NEWLINE|wxRE_DEFAULT);          wxRegEx exp3(wxT("(file://[^ ]+)"), wxRE_NEWLINE|wxRE_DEFAULT);
# Line 160  void mnNotePanel::makeHtml(WikiData* wik Line 160  void mnNotePanel::makeHtml(WikiData* wik
160  #else  #else
161          exp4.Replace(&htmlText, wxT("<TABLE WIDTH=\"100%\" CELLPADDING=5 CELLSPACING=2 BORDER=1><TR><TD BGCOLOR=\"#CCFFFF\"><FONT SIZE=5><B>\\1</B></FONT></TD></TR></TABLE><BR>"));          exp4.Replace(&htmlText, wxT("<TABLE WIDTH=\"100%\" CELLPADDING=5 CELLSPACING=2 BORDER=1><TR><TD BGCOLOR=\"#CCFFFF\"><FONT SIZE=5><B>\\1</B></FONT></TD></TR></TABLE><BR>"));
162  #endif  #endif
163            
164          /* :''XXXX'': */          /* :''XXXX'': */
165          wxRegEx exp6(wxT("^:''(.+)'':(.+)"), wxRE_NEWLINE|wxRE_DEFAULT);          wxRegEx exp6(wxT("^:''(.+)'':(.+)"), wxRE_NEWLINE|wxRE_DEFAULT);
166          exp6.Replace(&htmlText, wxT("<u><b>\\1:\\2</b></u>"));          exp6.Replace(&htmlText, wxT("<u><b>\\1:\\2</b></u>"));
# Line 168  void mnNotePanel::makeHtml(WikiData* wik Line 168  void mnNotePanel::makeHtml(WikiData* wik
168          /* ---- */          /* ---- */
169          wxRegEx exp7(wxT("^----.*"), wxRE_NEWLINE|wxRE_DEFAULT);          wxRegEx exp7(wxT("^----.*"), wxRE_NEWLINE|wxRE_DEFAULT);
170          exp7.Replace(&htmlText, wxT("<hr>"));          exp7.Replace(&htmlText, wxT("<hr>"));
171            
172            /* -XXXX */
173            wxRegEx exp16(wxT("^-(.*)"), wxRE_NEWLINE|wxRE_DEFAULT);
174    #ifdef __WXMAC__
175            exp16.Replace(&htmlText, wxT("<li>\\1</li>"));
176    #else
177            exp16.Replace(&htmlText, wxT("<ul><li>\\1</li></ul>"));
178    #endif
179            
180    
181          /* {{ }} */          /* {{ }} */
182          wxRegEx exp8(wxT("\\{\\{([^\\}]+)\\}\\}"));          wxRegEx exp8(wxT("\\{\\{([^\\}]+)\\}\\}"));
183          exp8.Replace(&htmlText, wxT("<a href=" MNDOC "\\1>\\1</a>"));          exp8.Replace(&htmlText, wxT("<a href=\"" MNDOC "\\1\">\\1</a>"));
184    
185          /* table */          /* table */
186          wxRegEx exp10(wxT("^,([^,]+)"), wxRE_NEWLINE|wxRE_DEFAULT);          wxRegEx exp10(wxT("^,([^,]+)"), wxRE_NEWLINE|wxRE_DEFAULT);
187          exp10.Replace(&htmlText, wxT("<td> \\1 </td>"));          exp10.Replace(&htmlText, wxT("<td> \\1 </td>"));
188          for(int i = 0; i < 10; i++){ // It's not good.  :P          for(int i = 0; i < 64; i++){ // It's not good.  :P
189                  wxRegEx exp16(wxT("</td>,([^,\n]+)"), wxRE_DEFAULT);                  wxRegEx exp16(wxT("</td>,([^,\n]+)"), wxRE_DEFAULT);
190                  exp16.Replace(&htmlText, wxT("</td><td>\\1</td>"));                  exp16.Replace(&htmlText, wxT("</td><td>\\1</td>"));
191          }          }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.15

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26