Fossil SCM

Be consistent about display of check-in comments as either text/plain or text/x-fossil-wiki. When the user configures text/plain, use that format everywhere.

drh 2012-11-22 23:35 trunk
Commit 2c6fa9c3b05788e22cca9ceafbd07134aa42996d
--- src/checkin.c
+++ src/checkin.c
@@ -581,11 +581,10 @@
581581
blob_init(&prompt, zInit, -1);
582582
#endif
583583
blob_append(&prompt,
584584
"\n"
585585
"# Enter comments on this check-in. Lines beginning with # are ignored.\n"
586
- "# The check-in comment follows wiki formatting rules.\n"
587586
"#\n", -1
588587
);
589588
blob_appendf(&prompt, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin);
590589
if( zBranch && zBranch[0] ){
591590
blob_appendf(&prompt, "# tags: %s\n#\n", zBranch);
592591
--- src/checkin.c
+++ src/checkin.c
@@ -581,11 +581,10 @@
581 blob_init(&prompt, zInit, -1);
582 #endif
583 blob_append(&prompt,
584 "\n"
585 "# Enter comments on this check-in. Lines beginning with # are ignored.\n"
586 "# The check-in comment follows wiki formatting rules.\n"
587 "#\n", -1
588 );
589 blob_appendf(&prompt, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin);
590 if( zBranch && zBranch[0] ){
591 blob_appendf(&prompt, "# tags: %s\n#\n", zBranch);
592
--- src/checkin.c
+++ src/checkin.c
@@ -581,11 +581,10 @@
581 blob_init(&prompt, zInit, -1);
582 #endif
583 blob_append(&prompt,
584 "\n"
585 "# Enter comments on this check-in. Lines beginning with # are ignored.\n"
 
586 "#\n", -1
587 );
588 blob_appendf(&prompt, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin);
589 if( zBranch && zBranch[0] ){
590 blob_appendf(&prompt, "# tags: %s\n#\n", zBranch);
591
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
8686
{ "background-mimetype", CONFIGSET_SKIN },
8787
{ "background-image", CONFIGSET_SKIN },
8888
{ "index-page", CONFIGSET_SKIN },
8989
{ "timeline-block-markup", CONFIGSET_SKIN },
9090
{ "timeline-max-comment", CONFIGSET_SKIN },
91
+ { "timeline-plaintext", CONFIGSET_SKIN },
9192
{ "adunit", CONFIGSET_SKIN },
9293
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
9394
{ "adunit-omit-if-user", CONFIGSET_SKIN },
9495
{ "th1-setup", CONFIGSET_ALL },
9596
9697
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
86 { "background-mimetype", CONFIGSET_SKIN },
87 { "background-image", CONFIGSET_SKIN },
88 { "index-page", CONFIGSET_SKIN },
89 { "timeline-block-markup", CONFIGSET_SKIN },
90 { "timeline-max-comment", CONFIGSET_SKIN },
 
91 { "adunit", CONFIGSET_SKIN },
92 { "adunit-omit-if-admin", CONFIGSET_SKIN },
93 { "adunit-omit-if-user", CONFIGSET_SKIN },
94 { "th1-setup", CONFIGSET_ALL },
95
96
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
86 { "background-mimetype", CONFIGSET_SKIN },
87 { "background-image", CONFIGSET_SKIN },
88 { "index-page", CONFIGSET_SKIN },
89 { "timeline-block-markup", CONFIGSET_SKIN },
90 { "timeline-max-comment", CONFIGSET_SKIN },
91 { "timeline-plaintext", CONFIGSET_SKIN },
92 { "adunit", CONFIGSET_SKIN },
93 { "adunit-omit-if-admin", CONFIGSET_SKIN },
94 { "adunit-omit-if-user", CONFIGSET_SKIN },
95 { "th1-setup", CONFIGSET_ALL },
96
97
+1 -1
--- src/info.c
+++ src/info.c
@@ -2153,11 +2153,11 @@
21532153
if( zNewColor && zNewColor[0] ){
21542154
@ <tr><td style="background-color: %h(zNewColor);">
21552155
}else{
21562156
@ <tr><td>
21572157
}
2158
- wiki_convert(&comment, 0, WIKI_INLINE|WIKI_NOBADLINKS);
2158
+ @ %w(blob_str(&comment))
21592159
blob_zero(&suffix);
21602160
blob_appendf(&suffix, "(user: %h", zNewUser);
21612161
db_prepare(&q, "SELECT substr(tagname,5) FROM tagxref, tag"
21622162
" WHERE tagname GLOB 'sym-*' AND tagxref.rid=%d"
21632163
" AND tagtype>1 AND tag.tagid=tagxref.tagid",
21642164
--- src/info.c
+++ src/info.c
@@ -2153,11 +2153,11 @@
2153 if( zNewColor && zNewColor[0] ){
2154 @ <tr><td style="background-color: %h(zNewColor);">
2155 }else{
2156 @ <tr><td>
2157 }
2158 wiki_convert(&comment, 0, WIKI_INLINE|WIKI_NOBADLINKS);
2159 blob_zero(&suffix);
2160 blob_appendf(&suffix, "(user: %h", zNewUser);
2161 db_prepare(&q, "SELECT substr(tagname,5) FROM tagxref, tag"
2162 " WHERE tagname GLOB 'sym-*' AND tagxref.rid=%d"
2163 " AND tagtype>1 AND tag.tagid=tagxref.tagid",
2164
--- src/info.c
+++ src/info.c
@@ -2153,11 +2153,11 @@
2153 if( zNewColor && zNewColor[0] ){
2154 @ <tr><td style="background-color: %h(zNewColor);">
2155 }else{
2156 @ <tr><td>
2157 }
2158 @ %w(blob_str(&comment))
2159 blob_zero(&suffix);
2160 blob_appendf(&suffix, "(user: %h", zNewUser);
2161 db_prepare(&q, "SELECT substr(tagname,5) FROM tagxref, tag"
2162 " WHERE tagname GLOB 'sym-*' AND tagxref.rid=%d"
2163 " AND tagtype>1 AND tag.tagid=tagxref.tagid",
2164
+1
--- src/main.c
+++ src/main.c
@@ -152,10 +152,11 @@
152152
int xlinkClusterOnly; /* Set when cloning. Only process clusters */
153153
int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
154154
int *aCommitFile; /* Array of files to be committed */
155155
int markPrivate; /* All new artifacts are private if true */
156156
int clockSkewSeen; /* True if clocks on client and server out of sync */
157
+ int wikiFlags; /* Wiki conversion flags applied to %w and %W */
157158
char isHTTP; /* True if server/CGI modes, else assume CLI. */
158159
char javascriptHyperlink; /* If true, set href= using script, not HTML */
159160
160161
int urlIsFile; /* True if a "file:" url */
161162
int urlIsHttps; /* True if a "https:" url */
162163
--- src/main.c
+++ src/main.c
@@ -152,10 +152,11 @@
152 int xlinkClusterOnly; /* Set when cloning. Only process clusters */
153 int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
154 int *aCommitFile; /* Array of files to be committed */
155 int markPrivate; /* All new artifacts are private if true */
156 int clockSkewSeen; /* True if clocks on client and server out of sync */
 
157 char isHTTP; /* True if server/CGI modes, else assume CLI. */
158 char javascriptHyperlink; /* If true, set href= using script, not HTML */
159
160 int urlIsFile; /* True if a "file:" url */
161 int urlIsHttps; /* True if a "https:" url */
162
--- src/main.c
+++ src/main.c
@@ -152,10 +152,11 @@
152 int xlinkClusterOnly; /* Set when cloning. Only process clusters */
153 int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
154 int *aCommitFile; /* Array of files to be committed */
155 int markPrivate; /* All new artifacts are private if true */
156 int clockSkewSeen; /* True if clocks on client and server out of sync */
157 int wikiFlags; /* Wiki conversion flags applied to %w and %W */
158 char isHTTP; /* True if server/CGI modes, else assume CLI. */
159 char javascriptHyperlink; /* If true, set href= using script, not HTML */
160
161 int urlIsFile; /* True if a "file:" url */
162 int urlIsHttps; /* True if a "https:" url */
163
+23 -10
--- src/printf.c
+++ src/printf.c
@@ -44,12 +44,11 @@
4444
#define etHTMLIZE 16 /* Make text safe for HTML */
4545
#define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
4646
#define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
4747
#define etFOSSILIZE 19 /* The fossil header encoding format. */
4848
#define etPATH 20 /* Path type */
49
-#define etWIKISTR 21 /* Wiki text rendered from a char*: %w */
50
-#define etWIKIBLOB 22 /* Wiki text rendered from a Blob*: %W */
49
+#define etWIKISTR 21 /* Timeline comment text rendered from a char*: %w */
5150
#define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
5251
#define etROOT 24 /* String value of g.zTop: % */
5352
5453
5554
/*
@@ -92,11 +91,10 @@
9291
{ 'q', 0, 4, etSQLESCAPE, 0, 0 },
9392
{ 'Q', 0, 4, etSQLESCAPE2, 0, 0 },
9493
{ 'b', 0, 2, etBLOB, 0, 0 },
9594
{ 'B', 0, 2, etBLOBSQL, 0, 0 },
9695
{ 'w', 0, 2, etWIKISTR, 0, 0 },
97
- { 'W', 0, 2, etWIKIBLOB, 0, 0 },
9896
{ 'h', 0, 4, etHTMLIZE, 0, 0 },
9997
{ 'R', 0, 0, etROOT, 0, 0 },
10098
{ 't', 0, 4, etHTTPIZE, 0, 0 }, /* "/" -> "%2F" */
10199
{ 'T', 0, 4, etURLIZE, 0, 0 }, /* "/" unchanged */
102100
{ 'F', 0, 4, etFOSSILIZE, 0, 0 },
@@ -156,10 +154,31 @@
156154
static int StrNLen32(const char *z, int N){
157155
int n = 0;
158156
while( (N-- != 0) && *(z++)!=0 ){ n++; }
159157
return n;
160158
}
159
+
160
+/*
161
+** Return an appropriate set of flags for wiki_convert() for displaying
162
+** comments on a timeline. These flag settings are determined by
163
+** configuration parameters.
164
+*/
165
+static int wiki_convert_flags(void){
166
+ static int wikiFlags = 0;
167
+ if( wikiFlags==0 ){
168
+ if( db_get_boolean("timeline-block-markup", 0) ){
169
+ wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
170
+ }else{
171
+ wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
172
+ }
173
+ if( db_get_boolean("timeline-plaintext", 0) ){
174
+ wikiFlags |= WIKI_LINKSONLY;
175
+ }
176
+ }
177
+ return wikiFlags;
178
+}
179
+
161180
162181
163182
/*
164183
** The root program. All variations call this core.
165184
**
@@ -698,21 +717,15 @@
698717
case etWIKISTR: {
699718
int limit = flag_alternateform ? va_arg(ap,int) : -1;
700719
char *zWiki = va_arg(ap, char*);
701720
Blob wiki;
702721
blob_init(&wiki, zWiki, limit);
703
- wiki_convert(&wiki, pBlob, WIKI_INLINE);
722
+ wiki_convert(&wiki, pBlob, wiki_convert_flags());
704723
blob_reset(&wiki);
705724
length = width = 0;
706725
break;
707726
}
708
- case etWIKIBLOB: {
709
- Blob *pWiki = va_arg(ap, Blob*);
710
- wiki_convert(pWiki, pBlob, WIKI_INLINE);
711
- length = width = 0;
712
- break;
713
- }
714727
case etERROR:
715728
buf[0] = '%';
716729
buf[1] = c;
717730
errorflag = 0;
718731
idx = 1+(c!=0);
719732
--- src/printf.c
+++ src/printf.c
@@ -44,12 +44,11 @@
44 #define etHTMLIZE 16 /* Make text safe for HTML */
45 #define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
46 #define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
47 #define etFOSSILIZE 19 /* The fossil header encoding format. */
48 #define etPATH 20 /* Path type */
49 #define etWIKISTR 21 /* Wiki text rendered from a char*: %w */
50 #define etWIKIBLOB 22 /* Wiki text rendered from a Blob*: %W */
51 #define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
52 #define etROOT 24 /* String value of g.zTop: % */
53
54
55 /*
@@ -92,11 +91,10 @@
92 { 'q', 0, 4, etSQLESCAPE, 0, 0 },
93 { 'Q', 0, 4, etSQLESCAPE2, 0, 0 },
94 { 'b', 0, 2, etBLOB, 0, 0 },
95 { 'B', 0, 2, etBLOBSQL, 0, 0 },
96 { 'w', 0, 2, etWIKISTR, 0, 0 },
97 { 'W', 0, 2, etWIKIBLOB, 0, 0 },
98 { 'h', 0, 4, etHTMLIZE, 0, 0 },
99 { 'R', 0, 0, etROOT, 0, 0 },
100 { 't', 0, 4, etHTTPIZE, 0, 0 }, /* "/" -> "%2F" */
101 { 'T', 0, 4, etURLIZE, 0, 0 }, /* "/" unchanged */
102 { 'F', 0, 4, etFOSSILIZE, 0, 0 },
@@ -156,10 +154,31 @@
156 static int StrNLen32(const char *z, int N){
157 int n = 0;
158 while( (N-- != 0) && *(z++)!=0 ){ n++; }
159 return n;
160 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
162
163 /*
164 ** The root program. All variations call this core.
165 **
@@ -698,21 +717,15 @@
698 case etWIKISTR: {
699 int limit = flag_alternateform ? va_arg(ap,int) : -1;
700 char *zWiki = va_arg(ap, char*);
701 Blob wiki;
702 blob_init(&wiki, zWiki, limit);
703 wiki_convert(&wiki, pBlob, WIKI_INLINE);
704 blob_reset(&wiki);
705 length = width = 0;
706 break;
707 }
708 case etWIKIBLOB: {
709 Blob *pWiki = va_arg(ap, Blob*);
710 wiki_convert(pWiki, pBlob, WIKI_INLINE);
711 length = width = 0;
712 break;
713 }
714 case etERROR:
715 buf[0] = '%';
716 buf[1] = c;
717 errorflag = 0;
718 idx = 1+(c!=0);
719
--- src/printf.c
+++ src/printf.c
@@ -44,12 +44,11 @@
44 #define etHTMLIZE 16 /* Make text safe for HTML */
45 #define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
46 #define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
47 #define etFOSSILIZE 19 /* The fossil header encoding format. */
48 #define etPATH 20 /* Path type */
49 #define etWIKISTR 21 /* Timeline comment text rendered from a char*: %w */
 
50 #define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
51 #define etROOT 24 /* String value of g.zTop: % */
52
53
54 /*
@@ -92,11 +91,10 @@
91 { 'q', 0, 4, etSQLESCAPE, 0, 0 },
92 { 'Q', 0, 4, etSQLESCAPE2, 0, 0 },
93 { 'b', 0, 2, etBLOB, 0, 0 },
94 { 'B', 0, 2, etBLOBSQL, 0, 0 },
95 { 'w', 0, 2, etWIKISTR, 0, 0 },
 
96 { 'h', 0, 4, etHTMLIZE, 0, 0 },
97 { 'R', 0, 0, etROOT, 0, 0 },
98 { 't', 0, 4, etHTTPIZE, 0, 0 }, /* "/" -> "%2F" */
99 { 'T', 0, 4, etURLIZE, 0, 0 }, /* "/" unchanged */
100 { 'F', 0, 4, etFOSSILIZE, 0, 0 },
@@ -156,10 +154,31 @@
154 static int StrNLen32(const char *z, int N){
155 int n = 0;
156 while( (N-- != 0) && *(z++)!=0 ){ n++; }
157 return n;
158 }
159
160 /*
161 ** Return an appropriate set of flags for wiki_convert() for displaying
162 ** comments on a timeline. These flag settings are determined by
163 ** configuration parameters.
164 */
165 static int wiki_convert_flags(void){
166 static int wikiFlags = 0;
167 if( wikiFlags==0 ){
168 if( db_get_boolean("timeline-block-markup", 0) ){
169 wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
170 }else{
171 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
172 }
173 if( db_get_boolean("timeline-plaintext", 0) ){
174 wikiFlags |= WIKI_LINKSONLY;
175 }
176 }
177 return wikiFlags;
178 }
179
180
181
182 /*
183 ** The root program. All variations call this core.
184 **
@@ -698,21 +717,15 @@
717 case etWIKISTR: {
718 int limit = flag_alternateform ? va_arg(ap,int) : -1;
719 char *zWiki = va_arg(ap, char*);
720 Blob wiki;
721 blob_init(&wiki, zWiki, limit);
722 wiki_convert(&wiki, pBlob, wiki_convert_flags());
723 blob_reset(&wiki);
724 length = width = 0;
725 break;
726 }
 
 
 
 
 
 
727 case etERROR:
728 buf[0] = '%';
729 buf[1] = c;
730 errorflag = 0;
731 idx = 1+(c!=0);
732
+2 -11
--- src/timeline.c
+++ src/timeline.c
@@ -192,11 +192,10 @@
192192
int tmFlags, /* Flags controlling display behavior */
193193
const char *zThisUser, /* Suppress links to this user */
194194
const char *zThisTag, /* Suppress links to this tag */
195195
void (*xExtra)(int) /* Routine to call on each line of display */
196196
){
197
- int wikiFlags;
198197
int mxWikiLen;
199198
Blob comment;
200199
int prevTagid = 0;
201200
int suppressCnt = 0;
202201
char zPrevDate[20];
@@ -207,18 +206,10 @@
207206
static Stmt qbranch;
208207
int pendingEndTr = 0; /* True if a </td></tr> is needed */
209208
210209
zPrevDate[0] = 0;
211210
mxWikiLen = db_get_int("timeline-max-comment", 0);
212
- if( db_get_boolean("timeline-block-markup", 0) ){
213
- wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
214
- }else{
215
- wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
216
- }
217
- if( db_get_boolean("timeline-plaintext", 0) ){
218
- wikiFlags |= WIKI_LINKSONLY;
219
- }
220211
if( tmFlags & TIMELINE_GRAPH ){
221212
pGraph = graph_init();
222213
/* style is not moved to css, because this is
223214
** a technical div for the timeline graph
224215
*/
@@ -358,14 +349,14 @@
358349
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
359350
Blob truncated;
360351
blob_zero(&truncated);
361352
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
362353
blob_append(&truncated, "...", 3);
363
- wiki_convert(&truncated, 0, wikiFlags);
354
+ @ %w(blob_str(&truncated))
364355
blob_reset(&truncated);
365356
}else{
366
- wiki_convert(&comment, 0, wikiFlags);
357
+ @ %w(blob_str(&comment))
367358
}
368359
blob_reset(&comment);
369360
370361
/* Generate the "user: USERNAME" at the end of the comment, together
371362
** with a hyperlink to another timeline for that user.
372363
--- src/timeline.c
+++ src/timeline.c
@@ -192,11 +192,10 @@
192 int tmFlags, /* Flags controlling display behavior */
193 const char *zThisUser, /* Suppress links to this user */
194 const char *zThisTag, /* Suppress links to this tag */
195 void (*xExtra)(int) /* Routine to call on each line of display */
196 ){
197 int wikiFlags;
198 int mxWikiLen;
199 Blob comment;
200 int prevTagid = 0;
201 int suppressCnt = 0;
202 char zPrevDate[20];
@@ -207,18 +206,10 @@
207 static Stmt qbranch;
208 int pendingEndTr = 0; /* True if a </td></tr> is needed */
209
210 zPrevDate[0] = 0;
211 mxWikiLen = db_get_int("timeline-max-comment", 0);
212 if( db_get_boolean("timeline-block-markup", 0) ){
213 wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
214 }else{
215 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
216 }
217 if( db_get_boolean("timeline-plaintext", 0) ){
218 wikiFlags |= WIKI_LINKSONLY;
219 }
220 if( tmFlags & TIMELINE_GRAPH ){
221 pGraph = graph_init();
222 /* style is not moved to css, because this is
223 ** a technical div for the timeline graph
224 */
@@ -358,14 +349,14 @@
358 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
359 Blob truncated;
360 blob_zero(&truncated);
361 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
362 blob_append(&truncated, "...", 3);
363 wiki_convert(&truncated, 0, wikiFlags);
364 blob_reset(&truncated);
365 }else{
366 wiki_convert(&comment, 0, wikiFlags);
367 }
368 blob_reset(&comment);
369
370 /* Generate the "user: USERNAME" at the end of the comment, together
371 ** with a hyperlink to another timeline for that user.
372
--- src/timeline.c
+++ src/timeline.c
@@ -192,11 +192,10 @@
192 int tmFlags, /* Flags controlling display behavior */
193 const char *zThisUser, /* Suppress links to this user */
194 const char *zThisTag, /* Suppress links to this tag */
195 void (*xExtra)(int) /* Routine to call on each line of display */
196 ){
 
197 int mxWikiLen;
198 Blob comment;
199 int prevTagid = 0;
200 int suppressCnt = 0;
201 char zPrevDate[20];
@@ -207,18 +206,10 @@
206 static Stmt qbranch;
207 int pendingEndTr = 0; /* True if a </td></tr> is needed */
208
209 zPrevDate[0] = 0;
210 mxWikiLen = db_get_int("timeline-max-comment", 0);
 
 
 
 
 
 
 
 
211 if( tmFlags & TIMELINE_GRAPH ){
212 pGraph = graph_init();
213 /* style is not moved to css, because this is
214 ** a technical div for the timeline graph
215 */
@@ -358,14 +349,14 @@
349 if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
350 Blob truncated;
351 blob_zero(&truncated);
352 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
353 blob_append(&truncated, "...", 3);
354 @ %w(blob_str(&truncated))
355 blob_reset(&truncated);
356 }else{
357 @ %w(blob_str(&comment))
358 }
359 blob_reset(&comment);
360
361 /* Generate the "user: USERNAME" at the end of the comment, together
362 ** with a hyperlink to another timeline for that user.
363
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1643,10 +1643,20 @@
16431643
popStack(&renderer);
16441644
}
16451645
blob_append(renderer.pOut, "\n", 1);
16461646
free(renderer.aStack);
16471647
}
1648
+
1649
+/*
1650
+** Send a string as wiki to CGI output.
1651
+*/
1652
+void wiki_write(const char *zIn, int flags){
1653
+ Blob in;
1654
+ blob_init(&in, zIn, -1);
1655
+ wiki_convert(&in, 0, flags);
1656
+ blob_reset(&in);
1657
+}
16481658
16491659
/*
16501660
** COMMAND: test-wiki-render
16511661
**
16521662
** %fossil test-wiki-render FILE [OPTIONS]
16531663
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1643,10 +1643,20 @@
1643 popStack(&renderer);
1644 }
1645 blob_append(renderer.pOut, "\n", 1);
1646 free(renderer.aStack);
1647 }
 
 
 
 
 
 
 
 
 
 
1648
1649 /*
1650 ** COMMAND: test-wiki-render
1651 **
1652 ** %fossil test-wiki-render FILE [OPTIONS]
1653
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1643,10 +1643,20 @@
1643 popStack(&renderer);
1644 }
1645 blob_append(renderer.pOut, "\n", 1);
1646 free(renderer.aStack);
1647 }
1648
1649 /*
1650 ** Send a string as wiki to CGI output.
1651 */
1652 void wiki_write(const char *zIn, int flags){
1653 Blob in;
1654 blob_init(&in, zIn, -1);
1655 wiki_convert(&in, 0, flags);
1656 blob_reset(&in);
1657 }
1658
1659 /*
1660 ** COMMAND: test-wiki-render
1661 **
1662 ** %fossil test-wiki-render FILE [OPTIONS]
1663

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button