You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Files/anchors can be freely moved without breaking links. This requires all
114
122
anchors to be globally unique. HTML allows upper/lowercase ASCII plus the
115
123
hyphen and underscore for IDs, meaning that a 5-character string provides
116
124
117
125
> 250 million unique anchors.
118
126
* Make picking a file/anchor easy: provide a searchable, expanded TOC listing
119
127
every anchor.
120
-
121
128
* Provide edit and view options. (Rely on an IDE to edit raw source.)
122
129
123
130
### Nice to have features
@@ -153,17 +160,50 @@ whitespace and optionally succeeded by whitespace. At least one whitespace
153
160
character must separate the opening comment delimiter from the doc block text.
154
161
Some examples in C:
155
162
156
-
<pre>void foo(); // This is not a doc block, because these comments are preceded<br>void bar(); // by non-whitespace characters. Instead, they're a code block.<br>//This is not a doc block, because these inline comments lack<br>//whitespace after the opening comment delimiter //. They're also a code block.<br>/*This is not a doc block, because this block comment lacks<br> whitespace after the opening comment delimiter /*. It's also a code block. */<br>/* This is not a doc block, because non-whitespace <br> characters follow the closing comment delimiter. <br> It's also a code block. */ void food();<br><br>// This is a doc block. It has no whitespace preceding the inline<br>// comment delimiters and one character of whitespace following it.<br> // This is also a doc block. It has two characters of whitespace <br> // preceding the comment delimiters and one character of whitespace following it.<br>/* This is a doc block. Because it's based on<br> a block comment, a single comment can span multiple lines. */<br>/* This is also a doc block, even without the visual alignment<br>or a whitespace before the closing comment delimiter.*/<br> /* This is a doc block<br> as well. */</pre>
163
+
```c
164
+
voidfoo(); // This is not a doc block, because these comments are preceded
165
+
voidbar(); // by non-whitespace characters. Instead, they're a code block.
166
+
//This is not a doc block, because these inline comments lack
167
+
//whitespace after the opening comment delimiter //. They're also a code block.
168
+
/*This is not a doc block, because this block comment lacks
169
+
whitespace after the opening comment delimiter /*. It's also a code block. */
170
+
/* This is not a doc block, because non-whitespace
171
+
characters follow the closing comment delimiter.
172
+
It's also a code block. */voidfood();
173
+
174
+
// This is a doc block. It has no whitespace preceding the inline
175
+
// comment delimiters and one character of whitespace following it.
176
+
// This is also a doc block. It has two characters of whitespace
177
+
// preceding the comment delimiters and one character of whitespace following it.
178
+
/* This is a doc block. Because it's based on
179
+
a block comment, a single comment can span multiple lines. */
180
+
/* This is also a doc block, even without the visual alignment
181
+
or a whitespace before the closing comment delimiter.*/
182
+
/* This is a doc block
183
+
as well. */
184
+
```
157
185
158
186
Doc blocks are differentiated by their indent: the whitespace characters
159
187
preceding the opening comment delimiter. Adjacent doc blocks with identical
160
188
indents are combined into a single, larger doc block.
161
189
162
-
<pre>// This is all one doc block, since only the preceding<br>// whitespace (there is none) matters, not the amount of <br>// whitespace following the opening comment delimiters.<br> // This is the beginning of a different doc<br> // block, since the indent is different.<br> // Here's a third doc block; inline and block comments<br> /* combine as long as the whitespace preceding the comment<br>delimiters is identical. Whitespace inside the comment doesn't affect<br> the classification. */<br>// These are two separate doc blocks,<br>void foo();<br>// since they are separated by a code block.</pre>
163
-
164
-
### <aid="implementation-programming-language-support"></a>\[Programming language
190
+
```c
191
+
// This is all one doc block, since only the preceding
192
+
// whitespace (there is none) matters, not the amount of
193
+
// whitespace following the opening comment delimiters.
194
+
// This is the beginning of a different doc
195
+
// block, since the indent is different.
196
+
// Here's a third doc block; inline and block comments
197
+
/* combine as long as the whitespace preceding the comment
198
+
delimiters is identical. Whitespace inside the comment doesn't affect
199
+
the classification. */
200
+
// These are two separate doc blocks,
201
+
voidfoo();
202
+
// since they are separated by a code block.
203
+
```
204
+
205
+
### <aid="implementation-programming-language-support"></a>\[Programming language support\](index.md#programming-language-support)
165
206
166
-
support\](index.md#programming-language-support)
167
207
168
208
Initial targets come from the Stack Overflow Developer Survey 2022's section on
169
209
[programming, scripting, and markup languages](https://survey.stackoverflow.co/2022/#section-most-popular-technologies-programming-scripting-and-markup-languages)
0 commit comments