0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-27 07:23:09 +00:00

update component/key names

This commit is contained in:
Charlie Humphreys
2023-07-15 00:14:50 -05:00
parent 18c94f95f3
commit 9d6a9c4ebf
6 changed files with 18 additions and 18 deletions

View File

@@ -6,9 +6,9 @@ export const HINT_TYPE = {
};
export const SNIPPET_TYPE = {
DEFAULT : 0,
INLINE_SNIPPET : 1,
IMAGE : 2,
BLOCK : 0,
INLINE : 1,
INJECTOR : 2,
};
export const FIELD_TYPE = {
@@ -18,9 +18,9 @@ export const FIELD_TYPE = {
export const PATTERNS = {
snippet : {
[SNIPPET_TYPE.DEFAULT] : (name)=>new RegExp(`^{{${name}(?:[^a-zA-Z].*)?`),
[SNIPPET_TYPE.INLINE_SNIPPET] : (name)=>new RegExp(`{{${name}`),
[SNIPPET_TYPE.IMAGE] : ()=>new RegExp(`^\\!\\[(?:[a-zA-Z -]+)?\\]\\(.*\\).*{[a-zA-Z0-9:, "'-]+}$`),
[SNIPPET_TYPE.BLOCK] : (name)=>new RegExp(`^{{${name}(?:[^a-zA-Z].*)?`),
[SNIPPET_TYPE.INLINE] : (name)=>new RegExp(`{{${name}`),
[SNIPPET_TYPE.INJECTOR] : ()=>new RegExp(`^\\!\\[(?:[a-zA-Z -]+)?\\]\\(.*\\).*{[a-zA-Z0-9:, "'-]+}$`),
},
field : {
[FIELD_TYPE.TEXT] : (name)=>new RegExp(`[{,;](${name}):("[^},;"]*"|[^},;]*)`),