no message
Former-commit-id: a38208d9a666e0a1ad07a7e90d5da4d7cb2ca208 Former-commit-id: 2198d191aac091d20c6f20243261dc07a0347d4e Former-commit-id: 5e3cb865fa31d4d77afef3a91633520db4f8bfbd
This commit is contained in:
@@ -36,6 +36,13 @@ export default {
|
|||||||
renderer.blockquote = (quote) => {
|
renderer.blockquote = (quote) => {
|
||||||
// 链接: https://pan.baidu.com/s/1pMNNDZP 密码: vc95
|
// 链接: https://pan.baidu.com/s/1pMNNDZP 密码: vc95
|
||||||
// https://pan.baidu.com/s/1c3gQGxE
|
// https://pan.baidu.com/s/1c3gQGxE
|
||||||
|
// 获取去掉HTML标签的内容
|
||||||
|
const quoteText = quote.replace(/<[^<>]+>/g, '').trim()
|
||||||
|
// 分享链接地址
|
||||||
|
const bdShareUrl = /^https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+$/i
|
||||||
|
if (bdShareUrl.test(quoteText)) {
|
||||||
|
return `<div style="color: red;">${quoteText}</div>`
|
||||||
|
}
|
||||||
return `<blockquote>${quote}</blockquote>`
|
return `<blockquote>${quote}</blockquote>`
|
||||||
}
|
}
|
||||||
this.markedHTML = marked(this.mdSource, {
|
this.markedHTML = marked(this.mdSource, {
|
||||||
|
|||||||
Reference in New Issue
Block a user