redhat-developer / redhat-developer/vscode-xml
formatOnPaste is broken when pasting inside a DOCTYPE section
Open
Nobody has claimed this yet.
bug
formatting
- Dominant language
- TypeScript
- Stars
- 328
- Forks
- 101
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 7
Description
With "editor.formatOnPaste": true, when pasting <!ENTITY foo "bar"> inside the DOCTYPE section of:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article [
]>
<article></article>
the block is formatted as
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article [
<null>
]>
<article></article>
instead of
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article [
<!ENTITY foo "bar">
]>
<article></article>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code with editor.formatOnPaste enabled and the XML DOCTYPE sample from the report. Trace the format-on-paste path for DOCTYPE content and verify that the completed output preserves the !ENTITY declaration and indentation instead of producing a null element.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100