Skip to content

Decode YAML escapes in .md issue template frontmatter - #9213

Open
PtJade Ceramic (PtJade-Ceramic) wants to merge 3 commits into
microsoft:mainfrom
PtJade-Ceramic:issue9193
Open

PtJade Ceramic (PtJade-Ceramic) wants to merge 3 commits into
microsoft:mainfrom
PtJade-Ceramic:issue9193

Conversation

@PtJade-Ceramic

Copy link
Copy Markdown

Fixes #9193

The frontmatter of a Markdown issue template is read with regular expressions
that only strip the surrounding quotes, so escape sequences such as \U0001F41B
reach NewIssue.md and the issue title verbatim instead of being decoded the way
GitHub decodes them.

Extract that parsing into src/issues/issueTemplate.ts without changing its
behavior, so it can be tested without the vscode module, and describe the
expected behavior in tests. They fail on this commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The frontmatter of a Markdown issue template is now parsed as YAML, the way
GitHub parses it, so escape sequences are decoded instead of being copied into
NewIssue.md and the issue title. Quotes, inline comments and empty values are
handled too, and the body starts after the closing delimiter, so a horizontal
rule in the body no longer truncates it.

Fixes microsoft#9193

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue templates: YAML escapes in .md frontmatter are not decoded (\U0001F41B ends up in NewIssue.md and in the created issue title)

1 participant