File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,32 @@ the equivalent of having the following comment in the code:
301
301
/// # ` This is the text that will be sent to the tool as input.`
302
302
```
303
303
304
+ ### Injecting HTML
305
+
306
+ It happens rarely, but sometimes what you really need is to inject some raw HTML
307
+ into the dartdoc output, without it being subject to Markdown processing
308
+ beforehand. This can be useful when the output of an external tool is HTML, for
309
+ instance. This is where the ` {@inject-html}...{@end-inject-html} ` tags come in.
310
+
311
+ Since this HTML fragment doesn't undergo Markdown processing, reference links
312
+ and other normal processing won't happen on the contained fragment.
313
+
314
+ So, this:
315
+ ``` dart
316
+ /// {@inject-html}
317
+ /// <p>[The HTML to inject.]()</p>
318
+ /// {@end-inject-html}
319
+ ```
320
+
321
+ Will result in this be emitted in its place in the HTML output (notice that the
322
+ markdown link isn't linked).
323
+ ```
324
+ <p>[The HTML to inject.]()</p>
325
+ ```
326
+
327
+ It's best to only inject HTML that is self-contained and doesn't depend upon
328
+ other elements on the page, since those may change in future versions of Dartdoc.
329
+
304
330
### Auto including dependencies
305
331
306
332
If ` --auto-include-dependencies ` flag is provided, dartdoc tries to automatically add
You can’t perform that action at this time.
0 commit comments