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-swap keys can't contain colon #293

Closed
johnzeringue opened this issue Jan 2, 2016 · 6 comments
Closed

--url-swap keys can't contain colon #293

johnzeringue opened this issue Jan 2, 2016 · 6 comments

Comments

@johnzeringue
Copy link
Contributor

Looking at bin/htmlproof, it's obvious that something like shown here is not possible from the command line, because the command line client simply splits each key-value pair on :, taking just the protocol from any URI key and prefixing the intended value.

I propose using \ as an escape character and supporting \: and \\ as escape sequences. This allows for colons and backslashes in both keys and values. The command line equivalent of the Ruby code in the article would then be htmlproof --url-swap http\://tongueroo.com: ./_site.

@gjtorikian, if you're okay with this solution, I'd be glad to make a pull request.

@gjtorikian
Copy link
Owner

Sounds great to me!

It would be extremely helpful if you make this change against the up-and-coming 3.0 branch: https://github.com/gjtorikian/html-proofer/tree/proofer-three-oh

A lot of the internals have changed, compared to what's on master.

@udiboy1209
Copy link

Has this been fixed? In what version, and when will it be released. really need this feature !

@gjtorikian
Copy link
Owner

I was waiting for a PR from @johnzeringue, I don't think it is fixed yet.

@gjtorikian gjtorikian self-assigned this Mar 15, 2016
@johnzeringue
Copy link
Contributor Author

I'll work on it this afternoon. Sorry, I've been busy.

@gjtorikian
Copy link
Owner

No worries! Me too!

@udiboy1209
Copy link

@johnzeringue nice! do tag me in the PR you open so I can follow it :)!

@johnzeringue johnzeringue changed the title --href-swap keys can't contain colon --url-swap keys can't contain colon Mar 15, 2016
johnzeringue added a commit to johnzeringue/html-proofer that referenced this issue Mar 15, 2016
Fixed gjtorikian#293 by adding `\\` and `\:` as escape sequences for the
`--url-swap` flag. This allows command line users the same
expressiveness as Ruby users.
@gjtorikian gjtorikian removed their assignment Apr 1, 2016
johnzeringue added a commit to johnzeringue/html-proofer that referenced this issue Jun 11, 2016
Fixed gjtorikian#293 by adding `\\` and `\:` as escape sequences for the
`--url-swap` flag. This allows command line users the same
expressiveness as Ruby users.
johnzeringue added a commit to johnzeringue/html-proofer that referenced this issue Jun 18, 2016
Fixed gjtorikian#293 by adding `\\` and `\:` as escape sequences for the
`--url-swap` flag. This allows command line users the same
expressiveness as Ruby users.
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

No branches or pull requests

3 participants