Skip to content

Indented highlight shortcode brings in the indentation as part of the code block #4717

@kaushalmodi

Description

@kaushalmodi
  • When using the highlight shortcode for code blocks in lists, the indentation needed to have the code blocks indented gets added to the code block itself.
  • This does not happen when using code fences.

So the bug seems to be localized to Hugo and not Blackfriday.

Here is a test page demonstrating the bug:

In the same test page above, the first section has the same code blocks, but done using the code fences, where that extra indentation issue is not seen.

Another effect of not removing that indentation is that the indentation before the closing {{< /highlight >}} creates an extra blank line in the final HTML.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions