HugoDocs: is `code` shortcode supposed to be used with triple backticks?

There’s a note on this page saying that code shortcodes should be used with triple backticks.

With the code shortcodes, you must include triple back ticks and a language declaration. This was done by design so that the shortcode wrappers were easily added to legacy documentation and will be that much easier to remove if needed in future versions of the Hugo docs.

However the current practice seems to be using code shortcode without the triple backticks, as can be seen here among many other places.

I also noticed that layouts/shortcodes/code.html adds <pre><code> around the content enclosed within the shortcode, overriding the theme’s definition of code shortcode -
here or here - which does not add <pre><code>.

With these in mind, I’m wondering what’s the current recommendation regarding the use of backticks within the code shortcode.

That statement about the backticks is definitely a little confusing, given the example that immediately follow it.

@budparr or @rdwatters, you folks worked on the code shortcode. Could you share how this actually works? We can update the docs to reflect that. :slight_smile: