Skip to content

使用 RegExp.$1 这种方式获取捕获组内容有时候不太稳定,会有缺陷 #99

@gou-mang-qin

Description

@gou-mang-qin

export function removeDOCTYPE(html) {
const matchResult = html.match(/<body.?>([\s\S]?)</body>/);
return matchResult? matchResult[1] : html;
} 建议改成这样

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions