Skip to content

Comments are not supported, but are part of the GFM spec #399

@tsfischer

Description

@tsfischer

Describe the bug
Comments are part of the Github Flavored Markdown spec: Source

However comments are not removed by this library, and instead are rendered as if they were clear text.

Checklist

  • I can reproduce this issue with a vanilla SwiftUI project.
  • I can reproduce this issue using the main branch of this package.
  • This bug hasn't been addressed in an existing GitHub issue.

Steps to reproduce
In a view body, try the following:

NOTE: Don't put a space between the ! and the first hypen. I had to do this to make it show up here on the report

`Markdown("<! -- This is a comment --> But this is not")

Expected behavior
Should output the text:

"But this is not"

Actual behavior
Outputs the text:

"<! -- This is a comment --> But this is not" (without the space after the !)

Screenshots
If applicable, add screenshots to help explain your problem.

Version information

  • MarkdownUI: [2.4.1]
  • OS: [MacOS 15.3.2]
  • Xcode: [e.g. 16.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions