-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathregexes.js
More file actions
23 lines (16 loc) · 691 Bytes
/
regexes.js
File metadata and controls
23 lines (16 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const inlineExtensionRegex = /^!(\w+)(?:\[([^\]]*)\])?(?:\(([^)]*)\))?(?:\{([^}]*)\})?/;
const blockExtensionRegex = /^(\w+):(?:(?:[ \t]+)([^\f\n\r\v]*))?(?:[\f\n\r\v]+):::([^]*?):::(?:(?:[\f\n\r\v]+)(?:\{([^}]*)\}))?/;
const keyValueQuotedPropertiesRegex = /(?:\t )*([^\t />"'=]+)=(?:"([^"]+)")/g;
const keyValuePropertiesRegex = /(?:\t )*([^\t />"'=]+)=([^\t />"'=]+)/g;
const classNameRegex = /(?:\t )*\.([^\t ]+)/g;
const idRegex = /(?:\t )*#([^\t ]+)/g;
const lonePropertiesRegex = /(?:\t )*([^\t />"'=]+)/g;
export {
inlineExtensionRegex,
blockExtensionRegex,
keyValueQuotedPropertiesRegex,
keyValuePropertiesRegex,
classNameRegex,
idRegex,
lonePropertiesRegex
};