mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
Please makes sure these boxes are checked before submitting your PR, thank you! * [ ] Make sure you are merging your commits to `master` branch. * [ ] Add some descriptions and refer relative issues for you PR. * [ ] DO NOT include files inside `lib` directory.
This commit is contained in:
parent
81ec7c763b
commit
1a945d445a
@ -265,8 +265,6 @@ export class Compiler {
|
||||
result = helperTpl('tip', text)
|
||||
} else if (/^\?>/.test(text)) {
|
||||
result = helperTpl('warn', text)
|
||||
} else if (/^</.test(text)) {
|
||||
return text
|
||||
} else {
|
||||
result = `<p>${text}</p>`
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ export function renderMixin(proto) {
|
||||
|
||||
const m = html
|
||||
.trim()
|
||||
.match('<img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)$')
|
||||
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$')
|
||||
|
||||
if (m) {
|
||||
if (m[2] === 'color') {
|
||||
@ -198,17 +198,6 @@ export function renderMixin(proto) {
|
||||
html = html.replace(m[0], '')
|
||||
}
|
||||
|
||||
// XXX: A Workaround
|
||||
html = html
|
||||
.split('\n')
|
||||
.map(part => {
|
||||
if (/^<a/.test(part)) {
|
||||
return part.replace('<a', '<a data-button')
|
||||
}
|
||||
return part
|
||||
})
|
||||
.join('\n')
|
||||
|
||||
this._renderTo('.cover-main', html)
|
||||
sticky()
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ section.cover
|
||||
max-width 500px
|
||||
padding 0
|
||||
|
||||
.cover-main > a[data-button]
|
||||
.cover-main > p:last-child a
|
||||
border-color var(--theme-color, $color-primary)
|
||||
border-radius 2rem
|
||||
border-style solid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user