microsoft / microsoft/vscode-livepreview
fragment/anchor in Uri is ignored when preview loose file
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 596
- Forks
- 119
- Avg merge
- 1d 4m
- Merged PRs (30d)
- 5
Description
when I call command livePreview.start.preview.atFile from my extension and pass a vscode.Uri which contains a fragment.
const htmlFile = 'file:///home/quan/test.html#section2';
const uri = vscode.Uri.parse(htmlFile);
vscode.commands.executeCommand('livePreview.start.preview.atFile', uri);
The html is previewed successfully. however,the fragment is ignored. the preview browser did not jump to section2 in test.html
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
Start at the livePreview.start.preview.atFile command entry point and trace how the vscode.Uri is converted into the preview URL. Reproduce the issue with a URI containing #section2 and confirm that the preview navigates to section2 in test.html when the fragment is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100