diff options
author | bcattaneo <c@ttaneo.uy> | 2020-09-08 12:27:10 -0300 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2021-03-31 19:40:07 +0200 |
commit | f99fc64d248e55a83a128f3283fa7fff012c4c11 (patch) | |
tree | 3f883739bd8971507f41d1264dc80b93eebaa483 | |
parent | 3b7869c2dcfe0fd8e48736a2dcda8dff3f6d5786 (diff) | |
download | wgetpaste-f99fc64d248e55a83a128f3283fa7fff012c4c11.tar.gz |
Add missing language to pinnwand JSON
-rwxr-xr-x | wgetpaste | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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' |