gojekyll icon indicating copy to clipboard operation
gojekyll copied to clipboard

Add support for markdown="0|span|block" attribute in HTML blocks

Open osteele opened this issue 7 months ago • 2 comments

Description

Currently, gojekyll does not support the ~markdown="1"~ markdown="0", markdown="span", or markdown="block"` attribute in HTML blocks, which are supported by Jekyll's default Kramdown processor.

Background

This issue was originally reported as part of #51, where it was mentioned that while the README documents that markdown="span" and markdown="block" are not supported, it does not explicitly mention that markdown="1" is also not supported. markdown="1" are currently supported, but markdown="0", markdown="span", and markdown="block" are not.

Expected Behavior

Add support for markdown="0", markdown="span", and markdown="block" attributes in HTML blocks, similar to how Jekyll's Kramdown processor handles them.

Example

<div markdown="0">
This is *markdown-like* content inside a non-HTML block.
</div>

osteele avatar May 21 '25 01:05 osteele

According to the Kramdown syntax documentation, the markdown attribute values have the following meanings:

  • 0: Disables markdown processing entirely
  • 1: Enables markdown processing (default)
  • block: Parses the content as a block-level element
  • span: Parses the content as a span-level element

These values control how the content within the element is processed by the markdown parser.

osteele avatar May 21 '25 08:05 osteele

The code and tests already support markdown="1". Kramdown also supports markdown="0", while this gojekyll doesn't. I've expanded the title to address this.

osteele avatar May 21 '25 09:05 osteele