| | @@ -137,11 +137,11 @@ |
| 137 | 137 | ** Only allow certain mimetypes through. |
| 138 | 138 | ** All others become "text/x-fossil-wiki" |
| 139 | 139 | */ |
| 140 | 140 | const char *wiki_filter_mimetypes(const char *zMimetype){ |
| 141 | 141 | if( zMimetype!=0 ){ |
| 142 | | - int i; |
| 142 | + int i; |
| 143 | 143 | for(i=0; i<sizeof(azStyles)/sizeof(azStyles[0]); i+=3){ |
| 144 | 144 | if( fossil_strcmp(zMimetype,azStyles[i+2])==0 ){ |
| 145 | 145 | return azStyles[i]; |
| 146 | 146 | } |
| 147 | 147 | } |
| | @@ -682,11 +682,11 @@ |
| 682 | 682 | zDate = db_text(0, "SELECT datetime('now')"); |
| 683 | 683 | zRemark = PD("r",""); |
| 684 | 684 | zUser = PD("u",g.zLogin); |
| 685 | 685 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 686 | 686 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 687 | | - blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 687 | + blob_appendf(p, "\n\n<hr /><div id=\"%s\"><i>On %s UTC %h", |
| 688 | 688 | zId, zDate, login_name()); |
| 689 | 689 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 690 | 690 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 691 | 691 | } |
| 692 | 692 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| | @@ -803,13 +803,13 @@ |
| 803 | 803 | } |
| 804 | 804 | if( P("preview")!=0 ){ |
| 805 | 805 | Blob preview; |
| 806 | 806 | blob_zero(&preview); |
| 807 | 807 | appendRemark(&preview, zMimetype); |
| 808 | | - @ Preview:<hr> |
| 808 | + @ Preview:<hr /> |
| 809 | 809 | wiki_render_by_mimetype(&preview, zMimetype); |
| 810 | | - @ <hr> |
| 810 | + @ <hr /> |
| 811 | 811 | blob_reset(&preview); |
| 812 | 812 | } |
| 813 | 813 | zUser = PD("u", g.zLogin); |
| 814 | 814 | form_begin(0, "%R/wikiappend"); |
| 815 | 815 | login_insert_csrf_secret(); |
| | @@ -1167,22 +1167,22 @@ |
| 1167 | 1167 | ** Usage: %fossil wiki (export|create|commit|list) WikiName |
| 1168 | 1168 | ** |
| 1169 | 1169 | ** Run various subcommands to work with wiki entries or tech notes. |
| 1170 | 1170 | ** |
| 1171 | 1171 | ** %fossil wiki export PAGENAME ?FILE? |
| 1172 | | -** %fossil wiki export ?FILE? -t|--technote DATETIME|TECHNOTE-ID |
| 1172 | +** %fossil wiki export ?FILE? -t|--technote DATETIME|TECHNOTE-ID |
| 1173 | 1173 | ** |
| 1174 | 1174 | ** Sends the latest version of either a wiki page or of a tech note |
| 1175 | | -** to the given file or standard output. |
| 1175 | +** to the given file or standard output. |
| 1176 | 1176 | ** If PAGENAME is provided, the wiki page will be output. For |
| 1177 | | -** a tech note either DATETIME or TECHNOTE-ID must be specified. If |
| 1177 | +** a tech note either DATETIME or TECHNOTE-ID must be specified. If |
| 1178 | 1178 | ** DATETIME is used, the most recently modified tech note with that |
| 1179 | 1179 | ** DATETIME will be sent. |
| 1180 | 1180 | ** |
| 1181 | 1181 | ** %fossil wiki (create|commit) PAGENAME ?FILE? ?OPTIONS? |
| 1182 | | -** |
| 1183 | | -** Create a new or commit changes to an existing wiki page or |
| 1182 | +** |
| 1183 | +** Create a new or commit changes to an existing wiki page or |
| 1184 | 1184 | ** technote from FILE or from standard input. PAGENAME is the |
| 1185 | 1185 | ** name of the wiki entry or the timeline comment of the |
| 1186 | 1186 | ** technote. |
| 1187 | 1187 | ** |
| 1188 | 1188 | ** Options: |
| | @@ -1208,11 +1208,11 @@ |
| 1208 | 1208 | ** |
| 1209 | 1209 | ** %fossil wiki list ?OPTIONS? |
| 1210 | 1210 | ** %fossil wiki ls ?OPTIONS? |
| 1211 | 1211 | ** |
| 1212 | 1212 | ** Lists all wiki entries, one per line, ordered |
| 1213 | | -** case-insensitively by name. |
| 1213 | +** case-insensitively by name. |
| 1214 | 1214 | ** |
| 1215 | 1215 | ** Options: |
| 1216 | 1216 | ** -t|--technote Technotes will be listed instead of |
| 1217 | 1217 | ** pages. The technotes will be in order |
| 1218 | 1218 | ** of timestamp with the most recent |
| | @@ -1308,11 +1308,11 @@ |
| 1308 | 1308 | }else{ |
| 1309 | 1309 | blob_read_from_file(&content, g.argv[4]); |
| 1310 | 1310 | } |
| 1311 | 1311 | if( !zMimeType || !*zMimeType ){ |
| 1312 | 1312 | /* Try to deduce the mime type based on the prior version. */ |
| 1313 | | - if ( !zETime ){ |
| 1313 | + if ( !zETime ){ |
| 1314 | 1314 | rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x" |
| 1315 | 1315 | " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'" |
| 1316 | 1316 | " ORDER BY x.mtime DESC LIMIT 1", |
| 1317 | 1317 | zPageName |
| 1318 | 1318 | ); |
| | @@ -1334,11 +1334,11 @@ |
| 1334 | 1334 | if ( !zETime ){ |
| 1335 | 1335 | fossil_fatal("wiki page %s already exists", zPageName); |
| 1336 | 1336 | }else{ |
| 1337 | 1337 | /* Creating a tech note with same timestamp is permitted |
| 1338 | 1338 | and should create a new tech note */ |
| 1339 | | - rid = 0; |
| 1339 | + rid = 0; |
| 1340 | 1340 | } |
| 1341 | 1341 | }else if( g.argv[2][1]=='o' && rid == 0 ){ |
| 1342 | 1342 | if ( !zETime ){ |
| 1343 | 1343 | fossil_fatal("no such wiki page: %s", zPageName); |
| 1344 | 1344 | }else{ |
| | @@ -1396,11 +1396,11 @@ |
| 1396 | 1396 | " AND e.tagid IS NOT NULL" |
| 1397 | 1397 | " AND t.tagid=e.tagid" |
| 1398 | 1398 | " ORDER BY e.mtime DESC /*sort*/" |
| 1399 | 1399 | ); |
| 1400 | 1400 | } |
| 1401 | | - |
| 1401 | + |
| 1402 | 1402 | while( db_step(&q)==SQLITE_ROW ){ |
| 1403 | 1403 | const char *zName = db_column_text(&q, 0); |
| 1404 | 1404 | if( showIds ){ |
| 1405 | 1405 | const char *zUuid = db_column_text(&q, 1); |
| 1406 | 1406 | fossil_print("%s ",zUuid); |
| | @@ -1421,11 +1421,11 @@ |
| 1421 | 1421 | ** COMMAND: test-markdown-render |
| 1422 | 1422 | ** |
| 1423 | 1423 | ** Usage: %fossil test-markdown-render FILE |
| 1424 | 1424 | ** |
| 1425 | 1425 | ** Render markdown wiki from FILE to stdout. |
| 1426 | | -** |
| 1426 | +** |
| 1427 | 1427 | */ |
| 1428 | 1428 | void test_markdown_render(void){ |
| 1429 | 1429 | Blob in, out; |
| 1430 | 1430 | db_find_and_open_repository(0,0); |
| 1431 | 1431 | verify_all_options(); |
| 1432 | 1432 | |