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.
2 parents 6f9365d + f8d1629 commit 8eee8f3Copy full SHA for 8eee8f3
gh-md-toc
@@ -51,17 +51,22 @@ gh_toc_load() {
51
# <p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>'"
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"
56
+ if [ -f "$TOKEN" ]; then
57
+ URL="$URL?access_token=$(cat $TOKEN)"
58
+ fi
59
curl -s --user-agent "$gh_user_agent" \
60
--data-binary @"$gh_file_md" -H "Content-Type:text/plain" \
- https://api.github.com/markdown/raw
61
+ $URL
62
}
63
64
#
65
# Is passed string url
66
67
gh_is_url() {
68
case $1 in
- https* | http*)
69
+ https* | http*)
70
echo "yes";;
71
*)
72
echo "no";;
0 commit comments