Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function str2obj(s){
function get_result(data, url, raw_url, start, stop, options, codeTag){
var split_data = data.split(/\r\n|\r|\n/).slice(start - 1, stop).join('\n')
var ext = path.extname(raw_url).slice(1)
var basename = path.basename(raw_url)
var basename = options['name'] || path.basename(raw_url)
var arg
if(options['cap']){
arg = [basename, 'lang:' + ext, url]
Expand Down Expand Up @@ -113,4 +113,4 @@ function ghcode(args){
})
}

hexo.extend.tag.register('ghcode', ghcode, {async: true})
hexo.extend.tag.register('ghcode', ghcode, {async: true})