1
0
Fork 0
mirror of https://github.com/kou029w/quot.git synced 2025-01-31 22:38:07 +00:00

Compare commits

..

No commits in common. "ad1e6ba9e4583d4a08546b9616d18f00ffe19106" and "330905f690ddfeb4cdf7cb52e07e27624bcf703c" have entirely different histories.

4 changed files with 22 additions and 16 deletions

View file

@ -1,13 +1,15 @@
@top Document { heading line* }
heading { Heading? "\n" }
line { Indent* ((AutoLink | word) space*)* "\n" }
heading { Heading "\n" }
line { Indent* (AutoLink | Word) (AutoLink | Word | Spaces)* "\n" }
@tokens {
space { $[ \t] }
word { ![ \t\n]+ }
Heading { ![\n]+ }
letter { ![ \t\n]+ }
Heading { letter+ }
Indent { space }
AutoLink { ("http" | "https") "://" word }
@precedence { AutoLink, word }
Spaces { space+ }
AutoLink { ("http" | "https") "://" letter+ }
Word { letter+ }
@precedence { AutoLink, Word }
}

View file

@ -2,15 +2,15 @@
import {LRParser} from "@lezer/lr"
export const parser = LRParser.deserialize({
version: 14,
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: "!w~OQQOZPO~OZSO~ORTOSVOZXO]VO~ORTOSVOZ^O]VO~O^_OSVXZVX]VX~OSVOZcO]VO~O^_OSVaZVa]Va~OS]~",
goto: "!T]PPPPP^dkvP|P!PQZRRbZSURZR[USWRZQ]UTaW]Q`VRd`RROTYRZ",
nodeNames: "⚠ Document Heading Indent AutoLink",
maxTerm: 14,
states: "#`OQOPOOOVOPOOQ[OQOOOOOO'#Cd'#CdOgOQO'#ChOrOSO'#ChOOOO'#Cc'#CcQ[OQOOOOOO-E6b-E6bO!QOSO,59SOOOO'#Ce'#Ce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kV%qRQPTUOX%zZp%zq~%zV&TRQPSUTUOX%zZp%zq~%zV&eTQPTUOXkZpkq![k![!]$l!]~k",
tokenizers: [0, 1, 2],
topRules: {"Document":[0,1]},
tokenPrec: 82
tokenPrec: 76
})

View file

@ -13,6 +13,7 @@ export const quotLanguage = LRLanguage.define({
Heading: t.heading,
Indent: t.separator,
AutoLink: t.link,
Spaces: t.content,
}),
],
}),
@ -34,5 +35,8 @@ export const quotHighlighting = syntaxHighlighting(
tag: t.link,
class: "auto-link",
},
{
tag: t.content,
},
])
);

View file

@ -18,8 +18,8 @@
font-size: 1rem;
}
.editor .cm-cursor {
border-left-color: var(--nc-tx-1);
.editor .cm-line {
display: flex;
}
.editor .auto-link:hover {