refactor: display

This commit is contained in:
2026-03-01 10:15:33 +08:00
parent ff091e2f31
commit ca48d818cc
2 changed files with 27 additions and 50 deletions
@@ -69,8 +69,8 @@ export function parseEmmet(input: string): ParsedEmmet {
function parseAttributes(attrString: string): Record<string, TrackerAttribute> {
const attributes: Record<string, TrackerAttribute> = {};
// 匹配键值对:key=value 或 key="value with spaces"
const regex = /(\w+)=(?:"([^"]*)"|'([^']*)'|([^\s]+))/g;
// 匹配键值对:使用,分隔
const regex = /(\w+)=(?:"([^"]*)"|'([^']*)'|([^,]+))/g;
let match: RegExpExecArray | null;
while ((match = regex.exec(attrString)) !== null) {