mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
fix: fixed rendering of color in coverpage issue
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getAndRemoveConfig } from '../compiler';
|
||||
import { getAndRemoveConfig } from '../utils';
|
||||
import { isAbsolutePath, getPath, getParentPath } from '../../router/util';
|
||||
|
||||
export const imageCompiler = ({ renderer, contentBase, router }) =>
|
||||
@@ -38,7 +38,11 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
|
||||
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href);
|
||||
}
|
||||
|
||||
return `<img src="${url}" data-origin="${href}" alt="${text}" ${attrs.join(
|
||||
' '
|
||||
)} />`;
|
||||
if (attrs.length > 0) {
|
||||
return `<img src="${url}" data-origin="${href}" alt="${text}" ${attrs.join(
|
||||
' '
|
||||
)} />`;
|
||||
}
|
||||
|
||||
return `<img src="${url}" data-origin="${href}" alt="${text}"${attrs}>`;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user