description: Block-level HTML comments, whose body is ordinary markdown. references:
An HTML comment is a region of a page that other markdown renderers ignore — GitHub, Obsidian, a plain viewer — but that SilverBullet treats as ordinary content, in the sense that it renders it like any other markdown text and [Object Index|object indexes](Object Index|object indexes) as well, albeit with an inComment: true attribute set so that it is easy to filter in queries.
Example:
Inside SilverBullet the <!-- and --> markers are hidden and the region gets a tint of its own, labelled comment in its top right corner. The “Resolve” button can be used to dismiss (= delete) the comment in its entirity.
Comments can be used to make notes to self or to team mates about the regular page content. There may be other future use cases as well.
Comment: Add (Ctrl-Alt-c / Cmd-Alt-c) inserts a comment after the current block. With text selected, the selection is quoted inside it as a blockquote, and the cursor lands a blank line below it so what you type starts its own paragraph rather than continuing the quote.Comment: Selection wraps the selected lines in <!-- and -->.Everything indexed inside a comment carries inComment = true, so a commented-out task is still a task — it simply says so:
<!--
* [ ] Buy milk
-->
Queries do not filter these out. Exclude them explicitly when you want only live content:
${from t = index.tasks() where not t.inComment}
A space-lua or space-style block inside a comment is not indexed, and the pages read at boot (CONFIG, Library|libraries) skip it as well, so commenting a script out is how you disable it.
What a comment does not switch off is live evaluation in the open editor: ${...} [Space Lua#Expressions|expressions](Space Lua#Expressions|expressions) and Lua-registered [API/codeWidget|code widgets](API/codeWidget|code widgets) inside a comment still run and render, and a commented-out space-lua block is still linted for syntax errors.