refactor: display
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user