summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcattaneo <c@ttaneo.uy>2020-09-08 12:27:10 -0300
committerRasmus Thomsen <oss@cogitri.dev>2021-03-31 19:40:07 +0200
commitf99fc64d248e55a83a128f3283fa7fff012c4c11 (patch)
tree3f883739bd8971507f41d1264dc80b93eebaa483
parent3b7869c2dcfe0fd8e48736a2dcda8dff3f6d5786 (diff)
downloadwgetpaste-f99fc64d248e55a83a128f3283fa7fff012c4c11.tar.gz
Add missing language to pinnwand JSON
-rwxr-xr-xwgetpaste4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgetpaste b/wgetpaste
index f75b500..9457b7a 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -289,8 +289,8 @@ REGEX_RAW_pinnwand='s|^\(https://bpa.st\)\(/.*\)$|\1/raw\2|'
escape_description_pinnwand() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; }
escape_input_pinnwand() { 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'; }
POST_pinnwand() {
- local description="${2}" content="${6}"
- echo "{\"expiry\": \"${DEFAULT_EXPIRATION_bpaste}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${DEFAULT_LANGUAGE_bpaste}\", \"content\": \"${content}\"} ] }"
+ local description="${2}" language="${3}" content="${6}"
+ echo "{\"expiry\": \"${DEFAULT_EXPIRATION_bpaste}\", \"files\": [ {\"name\": \"${description}\", \"lexer\": \"${language}\", \"content\": \"${content}\"} ] }"
}
# snippets
REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p'