diff options
author | bcattaneo <c@ttaneo.uy> | 2020-07-12 18:11:04 -0300 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-07-31 23:54:32 +0200 |
commit | 83f2bfa67f7a447a2a7d39f22c5a765179d36a27 (patch) | |
tree | 91b370b92d038f3ef6affc448ea7c5d7268e2654 | |
parent | 3f89d021981bd98364635329057ec6d94aa8de36 (diff) | |
download | wgetpaste-83f2bfa67f7a447a2a7d39f22c5a765179d36a27.tar.gz |
Fix snippets raw regex
-rwxr-xr-x | wgetpaste | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -94,7 +94,7 @@ json_gists() { } # snippets REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p' -REGEX_RAW_snippets='s|.*"raw_url":"\([^"]*\)".*|\1|p' +REGEX_RAW_snippets='s|^\(.*/snippets\)\(/.*\)$|\1\2/raw|' escape_description_snippets() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } escape_input_snippets() { 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_snippets() { |