Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL rewriting sometimes gets it wrong #322

Closed
angelo-mollame opened this issue Jan 13, 2019 · 2 comments · Fixed by #924
Closed

URL rewriting sometimes gets it wrong #322

angelo-mollame opened this issue Jan 13, 2019 · 2 comments · Fixed by #924
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@angelo-mollame
Copy link

Repro steps:

  1. git clone https://github.com/angelo-mollame/batch-replacer.git
  2. (if it's not the last commit anymore) git checkout 046f6597de1eeb5900f3e3d4a88649756332bbe8
  3. vsce package
  4. open the generated VSIX, open the README file in it, and compare it with the README file in the source code

Bottom part in the source code:

name = "\w+"
type = "[\w\.]+"
type = "%[type](?:<\w+(?:, \w+)*>)?"
type = "%[type](?:\[\])?"
type = "%[type](?: \| %[type])?"
parameter = "%[name]: %[type]"
parameters = "(?:%[parameter](?:, %[parameter])*)?"

replace-regex "(%[name])\((%[parameters])\): (%[type])"
with "$1: ($2) => $3"

Bottom part in the README in the VISX:

name = "\w+"
type = "[\w\.]+"
type = "%[type](https://github.com/angelo-mollame/batch-replacer/blob/master?:<\w+(&:, \w+)*>)?"
type = "%[type](https://github.com/angelo-mollame/batch-replacer/blob/master?:\[\])?"
type = "%[type](https://github.com/angelo-mollame/batch-replacer/blob/master?: \| %[type])?"
parameter = "%[name]: %[type]"
parameters = "(?:%[parameter](https://github.com/angelo-mollame/batch-replacer/blob/master?:, %[parameter])*)?"

replace-regex "(%[name])\((%[parameters])\): (%[type])"
with "$1: ($2) => $3"
angelo-mollame added a commit to angelo-mollame/batch-replacer that referenced this issue Jan 13, 2019
@joaomoreno joaomoreno added this to the December/January 2019 milestone Jan 14, 2019
@joaomoreno joaomoreno self-assigned this Jan 14, 2019
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jan 14, 2019
@joaomoreno joaomoreno modified the milestones: December/January 2019, Backlog Jan 28, 2019
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Jan 28, 2019
@joaomoreno joaomoreno removed this from the Backlog milestone Oct 11, 2019
@joaomoreno joaomoreno changed the title vsce package adds artifacts to the README of the VSIX file URL rewriting sometimes gets it wrong Nov 2, 2021
@Wastus
Copy link

Wastus commented Jun 28, 2023

I just tried to include pictures encoded in base64 to my readme.md because other measures aren't working in our environment. But the URL rewriting will also rewrite those and break them in the process, which leaves me with no images regardless of what I try:
![Demo2](data:image/gif;base64,R0lGODlhkAagA...)

joaomoreno added a commit that referenced this issue Dec 18, 2023
@joaomoreno joaomoreno mentioned this issue Dec 18, 2023
@joaomoreno
Copy link
Member

@angelo-mollame Please use --no-rewrite-relative-links

@Wastus Will fix this by avoiding rewriting data: URLs.

@joaomoreno joaomoreno added this to the December / January 2024 milestone Dec 18, 2023
@joaomoreno joaomoreno removed the help wanted Issues identified as good community contribution opportunities label Dec 18, 2023
joaomoreno added a commit that referenced this issue Dec 18, 2023
@connor4312 connor4312 added the verified Verification succeeded label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants