Fossil SCM

Clarify that backslashes in the help text of commands/webpages must be escaped for correct processing by mkindex.c.

danield 2023-04-24 14:33 trunk
Commit 5c8f5575657c0e3fec88c6b5bc983599b391e9f7c64e873d5af2ee32652eafcb
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -59,10 +59,11 @@
5959
** New arguments may be added in future releases that set additional
6060
** bits in the eCmdFlags field.
6161
**
6262
** Additional lines of comment after the COMMAND: or WEBPAGE: or SETTING:
6363
** become the built-in help text for that command or webpage or setting.
64
+** Backslashes must be escaped ("\\" in comment yields "\" in the help text.)
6465
**
6566
** Multiple COMMAND: entries can be attached to the same command, thus
6667
** creating multiple aliases for that command. Similarly, multiple
6768
** WEBPAGE: entries can be attached to the same webpage function, to give
6869
** that page aliases.
6970
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -59,10 +59,11 @@
59 ** New arguments may be added in future releases that set additional
60 ** bits in the eCmdFlags field.
61 **
62 ** Additional lines of comment after the COMMAND: or WEBPAGE: or SETTING:
63 ** become the built-in help text for that command or webpage or setting.
 
64 **
65 ** Multiple COMMAND: entries can be attached to the same command, thus
66 ** creating multiple aliases for that command. Similarly, multiple
67 ** WEBPAGE: entries can be attached to the same webpage function, to give
68 ** that page aliases.
69
--- tools/mkindex.c
+++ tools/mkindex.c
@@ -59,10 +59,11 @@
59 ** New arguments may be added in future releases that set additional
60 ** bits in the eCmdFlags field.
61 **
62 ** Additional lines of comment after the COMMAND: or WEBPAGE: or SETTING:
63 ** become the built-in help text for that command or webpage or setting.
64 ** Backslashes must be escaped ("\\" in comment yields "\" in the help text.)
65 **
66 ** Multiple COMMAND: entries can be attached to the same command, thus
67 ** creating multiple aliases for that command. Similarly, multiple
68 ** WEBPAGE: entries can be attached to the same webpage function, to give
69 ** that page aliases.
70
--- www/adding_code.wiki
+++ www/adding_code.wiki
@@ -118,11 +118,11 @@
118118
119119
<blockquote><verbatim>
120120
/*
121121
** COMMAND: xyzzy
122122
**
123
-** Help text goes here.
123
+** Help text goes here. Backslashes must be escaped.
124124
*/
125125
void xyzzy_cmd(void){
126126
/* Implement the command here */
127127
fossil_print("Hello, World!\n");
128128
}
129129
--- www/adding_code.wiki
+++ www/adding_code.wiki
@@ -118,11 +118,11 @@
118
119 <blockquote><verbatim>
120 /*
121 ** COMMAND: xyzzy
122 **
123 ** Help text goes here.
124 */
125 void xyzzy_cmd(void){
126 /* Implement the command here */
127 fossil_print("Hello, World!\n");
128 }
129
--- www/adding_code.wiki
+++ www/adding_code.wiki
@@ -118,11 +118,11 @@
118
119 <blockquote><verbatim>
120 /*
121 ** COMMAND: xyzzy
122 **
123 ** Help text goes here. Backslashes must be escaped.
124 */
125 void xyzzy_cmd(void){
126 /* Implement the command here */
127 fossil_print("Hello, World!\n");
128 }
129

Keyboard Shortcuts

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