We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d36e74 commit c2479a7Copy full SHA for c2479a7
gh-md-toc
@@ -52,10 +52,15 @@ gh_toc_load() {
52
gh_toc_md2html() {
53
local gh_file_md=$1
54
URL=https://api.github.com/markdown/raw
55
- TOKEN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"
+ if [ -z "$GH_TOC_TOKEN" ]; then
56
+ TOKEN=$GH_TOC_TOKEN
57
+ else
58
+ TOKEN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"
59
+ fi
60
if [ -f "$TOKEN" ]; then
61
URL="$URL?access_token=$(cat $TOKEN)"
62
fi
63
+ # echo $URL 1>&2
64
OUTPUT="$(curl -s --user-agent "$gh_user_agent" \
65
--data-binary @"$gh_file_md" -H "Content-Type:text/plain" \
66
$URL)"
0 commit comments