mirror of
https://github.com/kou029w/quot.git
synced 2025-01-31 14:28:06 +00:00
Compare commits
4 commits
330905f690
...
ad1e6ba9e4
Author | SHA1 | Date | |
---|---|---|---|
ad1e6ba9e4 | |||
eaab4dad30 | |||
0a02a259c3 | |||
ec7357ee20 |
4 changed files with 16 additions and 22 deletions
|
@ -1,15 +1,13 @@
|
||||||
@top Document { heading line* }
|
@top Document { heading line* }
|
||||||
|
|
||||||
heading { Heading "\n" }
|
heading { Heading? "\n" }
|
||||||
line { Indent* (AutoLink | Word) (AutoLink | Word | Spaces)* "\n" }
|
line { Indent* ((AutoLink | word) space*)* "\n" }
|
||||||
|
|
||||||
@tokens {
|
@tokens {
|
||||||
space { $[ \t] }
|
space { $[ \t] }
|
||||||
letter { ![ \t\n]+ }
|
word { ![ \t\n]+ }
|
||||||
Heading { letter+ }
|
Heading { ![\n]+ }
|
||||||
Indent { space }
|
Indent { space }
|
||||||
Spaces { space+ }
|
AutoLink { ("http" | "https") "://" word }
|
||||||
AutoLink { ("http" | "https") "://" letter+ }
|
@precedence { AutoLink, word }
|
||||||
Word { letter+ }
|
|
||||||
@precedence { AutoLink, Word }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
import {LRParser} from "@lezer/lr"
|
import {LRParser} from "@lezer/lr"
|
||||||
export const parser = LRParser.deserialize({
|
export const parser = LRParser.deserialize({
|
||||||
version: 14,
|
version: 14,
|
||||||
states: "#`OQOPOOOVOPOOQ[OQOOOOOO'#Cd'#CdOgOQO'#ChOrOSO'#ChOOOO'#Cc'#CcQ[OQOOOOOO-E6b-E6bO!QOSO,59SOOOO'#Ce'#CeO!QOSO,59SOOOO,59S,59SOOOO-E6a-E6aO!`OSO1G.nOOOO1G.n1G.nOOOO-E6c-E6cOOOO7+$Y7+$Y",
|
states: "#rOQOPOOOOOO'#Cf'#CfOYOPO'#CfQ_OQOOOOOO,59Q,59QOOOO'#Cb'#CbOmOQO'#ChO{OSO'#CcOpOQO'#ChOOOO'#Ch'#ChOOOO'#Ca'#CaQ_OQOOOOOO-E6`-E6`O!ZOQO,59SOOOO,59S,59SOOOO'#Cd'#CdO!fOSO,58}OOOO-E6a-E6aOOOO-E6_-E6_OOOO1G.n1G.nOOOO-E6b-E6b",
|
||||||
stateData: "!q~OQPO~OZQO~ORROSTOTTO~ORROSXOTXO~OSYOTYOUYOZ[O~OSYOTYOUYOZ_O~OSYOTYOUYOZaO~OST~",
|
stateData: "!w~OQQOZPO~OZSO~ORTOSVOZXO]VO~ORTOSVOZ^O]VO~O^_OSVXZVX]VX~OSVOZcO]VO~O^_OSVaZVa]Va~OS]~",
|
||||||
goto: "y]PPPPPPP^dkPPuQVQR]VSSQVRWSQZTQ^XT`Z^TUQV",
|
goto: "!T]PPPPP^dkvP|P!PQZRRbZSURZR[USWRZQ]UTaW]Q`VRd`RROTYRZ",
|
||||||
nodeNames: "⚠ Document Heading Indent AutoLink Word Spaces",
|
nodeNames: "⚠ Document Heading Indent AutoLink",
|
||||||
maxTerm: 12,
|
maxTerm: 14,
|
||||||
skippedNodes: [0],
|
skippedNodes: [0],
|
||||||
repeatNodeCount: 3,
|
repeatNodeCount: 4,
|
||||||
tokenData: "&t~RWOXkXY{YZ!eZpkpq{q#[k#[#]!j#]~kVrRQPTUOXkZpkq~kU!SQRQUSXY!Ypq!YS!_QUSXY!Ypq!Y~!jOZ~V!qTQPTUOXkZpkq#hk#h#i#Q#i~kV#XTQPTUOXkZpkq#hk#h#i#h#i~kV#oTQPTUOXkZpkq#dk#d#e$O#e~kV$VVQPTUOXkZpkq![k![!]$l!]#gk#g#h&^#h~kV$sTQPTUOXkZpkq!Pk!P!Q%S!Q~kV%ZTQPTUOXkZpkq!Pk!P!Q%j!Q~kV%qRQPTUOX%zZp%zq~%zV&TRQPSUTUOX%zZp%zq~%zV&eTQPTUOXkZpkq![k![!]$l!]~k",
|
tokenData: "(U~RWOXkXY!^YZ!mZpkpq!^q#[k#[#]!r#]~kVrTQP]UOXkXY!RZpkpq!Rq~kP!WQQPOY!RZ~!RV!gQQPRQ^SOY!RZ~!R~!rOZ~V!yVQP]UOXkXY!RZpkpq!Rq#hk#h#i#`#i~kV#gVQP]UOXkXY!RZpkpq!Rq#hk#h#i#|#i~kV$TVQP]UOXkXY!RZpkpq!Rq#dk#d#e$j#e~kV$qXQP]UOXkXY!RZpkpq!Rq![k![!]%^!]#gk#g#h'h#h~kV%eVQP]UOXkXY!RZpkpq!Rq!Pk!P!Q%z!Q~kV&RVQP]UOXkXY!RZpkpq!Rq!Pk!P!Q&h!Q~kV&oTQP]UOX'OXY!RZp'Opq!Rq~'OV'XTQPSU]UOX'OXY!RZp'Opq!Rq~'OV'oVQP]UOXkXY!RZpkpq!Rq![k![!]%^!]~k",
|
||||||
tokenizers: [0, 1, 2],
|
tokenizers: [0, 1, 2],
|
||||||
topRules: {"Document":[0,1]},
|
topRules: {"Document":[0,1]},
|
||||||
tokenPrec: 76
|
tokenPrec: 82
|
||||||
})
|
})
|
||||||
|
|
|
@ -13,7 +13,6 @@ export const quotLanguage = LRLanguage.define({
|
||||||
Heading: t.heading,
|
Heading: t.heading,
|
||||||
Indent: t.separator,
|
Indent: t.separator,
|
||||||
AutoLink: t.link,
|
AutoLink: t.link,
|
||||||
Spaces: t.content,
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
@ -35,8 +34,5 @@ export const quotHighlighting = syntaxHighlighting(
|
||||||
tag: t.link,
|
tag: t.link,
|
||||||
class: "auto-link",
|
class: "auto-link",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
tag: t.content,
|
|
||||||
},
|
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor .cm-line {
|
.editor .cm-cursor {
|
||||||
display: flex;
|
border-left-color: var(--nc-tx-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor .auto-link:hover {
|
.editor .auto-link:hover {
|
||||||
|
|
Loading…
Add table
Reference in a new issue