diff options
author | Benedikt Morbach <moben@exherbo.org> | 2013-03-07 04:41:06 +0100 |
---|---|---|
committer | Bo Ørsted Andresen <zlin@exherbo.org> | 2013-03-09 14:53:28 +0100 |
commit | d48eac0451283a78d463c97ec76ec20880f1ab41 (patch) | |
tree | 7ca3c6c895b3c545f18ae2035f2cf8d03c6e3380 | |
parent | be3541ff79155ab7268984489666237f0bd0a79b (diff) | |
download | wgetpaste-d48eac0451283a78d463c97ec76ec20880f1ab41.tar.gz |
gists: Fix raw url.
With a trailing '/' at the end, gists returns an empty response for raw pastes.
-rwxr-xr-x | wgetpaste | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -93,7 +93,7 @@ opa cl p parrot pasm pir pl aw txt ps1 pl pp pd py pytb r rkt raw r cw rst rhtml rb rs sage sass scala scm sci scss self sh st tpl sql sml sc tcl tcsh tea tex textile t twig vala v vhd vim vb xml xq xs yml" REGEX_URL_gists='s|^.*"html_url": "\([^"]\+\)".*$|\1|p' -REGEX_RAW_gists='s|^\(https://\)\(gist\)\(.github.com/\)\(.*\)$|\1raw\3\2/\4/|' +REGEX_RAW_gists='s|^\(https://\)\(gist\)\(.github.com/\)\(.*\)$|\1raw\3\2/\4|' escape_description_gists() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } escape_input_gists() { sed -e 's|\\|\\\\|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' -e 's|\t|\\t|g' -e 's|"|\\"|g' -e 's|$|\\n|' <<< "$*" | tr -d '\n'; } json_gists() { |