Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Add inline comments?

A topic by Prestosilver created Nov 04, 2021 Views: 142 Replies: 1
Viewing posts 1 to 2

Is there a way to insert inline comments or something of that nature. Ive been using a custom markdown compiler I wrote for years, just recently, I got sick of the jank and then i found this, the one thing i really miss is the comments i used to be able to include. If this is not yet implemented it might be possible to have a % character start a comment.

(2 edits)

There really isn’t an accepted standard for comments in Markdown, and I’m not planning to add something special for Deepdwn.

This is really a markdown issue, I’m afraid, but you do have a few options, and it depends on what your intended use is.

The most common option is probably:

[comment]: # (your comment goes here)

This uses a link label that isn’t referenced in your document, and so doesn’t appear in the output. There are a few different formats for this, but the above is probably the best version.

Another option is to use HTML comments:

<!-- comment here -->

These are actually stripped from the output entirely in Deepdwn, but they’ll likely appear in your HTML source if you’re using Deepdwn to manage your blog posts (or similar) where some other tool is responsible for the rendering the HTML.

Some engines also have their own comment syntax that you can use, like

{% comment %}
Your comment here
{% endcomment %}

in Jekyll.

I hope that helps!