apple/swift-markdown

BlockDirective parsing for a new line ")" will give an incorrect output

Closed this issue ยท 2 comments

Description

@Image(
       source: "xx", 
       alt: "yy"
)

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

Show the image

Actual behavior

Show the image with an extra ")"

Steps To Reproduce

I highly suspect this is a swift-markdown issue

Swift-DocC Version Information

No response

Swift Compiler Version Information

No response

And this is actually working ๐Ÿค”

@Image(
    source: xx,
    alt: xx
    )

Confirm this is a swift-markdown issue.
Input:

@Image(
  source: "xx",
  alt: "yy"
)

โฌ‡๏ธ
Unexpected ouput

โ”œโ”€ BlockDirective @1:1-3:12 name: "Image"
โ”‚  โ”œโ”€ Argument text segments:
โ”‚  |    @2:1-2:16: "  source: \"xx\","
โ”‚  |    @3:1-3:12: "  alt: \"yy\""