tag:调整OSS图床辅助函数参数顺序。

This commit is contained in:
徐涛 2021-05-04 21:21:13 +08:00
parent 416382d7b6
commit c2cadf2130

View File

@ -14,17 +14,17 @@ hexo.extend.tag.register('oss_image', function(args) {
let altMessage = args[2] || '';
attrs.push(`alt="${altMessage}"`);
let classes = args[3] || '';
let classes = args[5] || '';
if (classes.length !== 0) {
attrs.push(`class="${classes}"`);
}
let width = args[4] || 0;
let width = args[3] || 0;
if (width !== 0) {
attrs.push(`width="${width}"`);
}
let height = args[5] || 0;
let height = args[4] || 0;
if (height !== 0) {
attrs.push(`height="${height}"`);
}