mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
feat: update wx renderer
This commit is contained in:
parent
e300fbcefb
commit
c7eea12c2a
@ -184,7 +184,7 @@ class WxRenderer {
|
|||||||
return `<figure ${figureStyles}><img ${imgStyles} src="${href}" title="${title}" alt="${text}"/>${subText}</figure>`;
|
return `<figure ${figureStyles}><img ${imgStyles} src="${href}" title="${title}" alt="${text}"/>${subText}</figure>`;
|
||||||
};
|
};
|
||||||
renderer.link = (href, title, text) => {
|
renderer.link = (href, title, text) => {
|
||||||
if (href.indexOf("https://mp.weixin.qq.com") === 0) {
|
if (href.startsWith("https://mp.weixin.qq.com")) {
|
||||||
return `<a href="${href}" title="${
|
return `<a href="${href}" title="${
|
||||||
title || text
|
title || text
|
||||||
}" ${getStyles("wx_link")}>${text}</a>`;
|
}" ${getStyles("wx_link")}>${text}</a>`;
|
||||||
@ -205,7 +205,6 @@ class WxRenderer {
|
|||||||
`<section style="padding:0 8px;"><table class="preview-table"><thead ${getStyles(
|
`<section style="padding:0 8px;"><table class="preview-table"><thead ${getStyles(
|
||||||
"thead"
|
"thead"
|
||||||
)}>${header}</thead><tbody>${body}</tbody></table></section>`;
|
)}>${header}</thead><tbody>${body}</tbody></table></section>`;
|
||||||
// renderer.tablerow = (text) => `<tr style="">${text}</tr>`;
|
|
||||||
renderer.tablecell = (text, flags) =>
|
renderer.tablecell = (text, flags) =>
|
||||||
`<td ${getStyles("td")}>${text}</td>`;
|
`<td ${getStyles("td")}>${text}</td>`;
|
||||||
renderer.hr = () =>
|
renderer.hr = () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user