fix: not replace <pre> in list (#226)

This commit is contained in:
RedCloud 2023-06-18 20:54:42 +08:00 committed by GitHub
parent f6edf04dd6
commit f397d9184e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -141,7 +141,7 @@ class WxRenderer {
)}><span><%s/></span>${text}</li>`; )}><span><%s/></span>${text}</li>`;
renderer.list = (text, ordered, start) => { renderer.list = (text, ordered, start) => {
text = text.replace(/<\/*p.*?>/g, ""); text = text.replace(/<\/*p .*?>/g, "").replace(/<\/*p>/g, "");
let segments = text.split(`<%s/>`); let segments = text.split(`<%s/>`);
if (!ordered) { if (!ordered) {
text = segments.join("• "); text = segments.join("• ");

View File

@ -178,6 +178,7 @@ const mutations = {
display: -webkit-box; display: -webkit-box;
padding: 0.5em 1em 1em; padding: 0.5em 1em 1em;
overflow-x: auto; overflow-x: auto;
text-indent: 0;
} }
</style> </style>
` `