diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 0ce4f454..400ebedd 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1258,7 +1258,6 @@ dependencies = [ "hkdf", "num", "once_cell", - "openssl", "rand 0.8.5", "sha2", ] @@ -2875,7 +2874,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" dependencies = [ - "cc", "pkg-config", ] diff --git a/src-web/components/core/Editor/extensions.ts b/src-web/components/core/Editor/extensions.ts index c1a71f32..9ec1473f 100644 --- a/src-web/components/core/Editor/extensions.ts +++ b/src-web/components/core/Editor/extensions.ts @@ -50,7 +50,6 @@ export const syntaxHighlightStyle = HighlightStyle.define([ { tag: [t.documentMeta, t.blockComment, t.lineComment, t.docComment, t.comment], color: 'var(--textSubtlest)', - fontStyle: 'italic', }, { tag: [t.emphasis], diff --git a/src-web/components/core/Editor/url/highlight.ts b/src-web/components/core/Editor/url/highlight.ts index e908323f..85467f4f 100644 --- a/src-web/components/core/Editor/url/highlight.ts +++ b/src-web/components/core/Editor/url/highlight.ts @@ -4,7 +4,6 @@ export const highlight = styleTags({ Protocol: t.comment, Placeholder: t.emphasis, // PathSegment: t.tagName, - // Port: t.attributeName, // Host: t.variableName, // Path: t.bool, // Query: t.string, diff --git a/src-web/components/core/Editor/url/url.grammar b/src-web/components/core/Editor/url/url.grammar index 1fd9e797..62c97dd8 100644 --- a/src-web/components/core/Editor/url/url.grammar +++ b/src-web/components/core/Editor/url/url.grammar @@ -1,20 +1,19 @@ -@top url { Protocol? Host Port? Path? Query? } +@top url { Protocol? Host Path? Query? } Path { ("/" (Placeholder | PathSegment))+ } Query { "?" queryPair ("&" queryPair)* } @tokens { - Protocol { $[a-zA-Z]+ "://" } - Host { $[a-zA-Z0-9-_.]+ } - Port { ":" $[0-9]+ } - Placeholder { ":" ![/?#]+ } - PathSegment { ![?#/]+ } - queryPair { ($[a-zA-Z0-9]+ ("=" $[a-zA-Z0-9]*)?) } + Protocol { $[a-zA-Z]+ "://" } + Host { $[a-zA-Z0-9-_.:\[\]]+ } + @precedence { Protocol, Host } - // Protocol/host overlaps, so give proto explicit precedence - @precedence { Protocol, Host } - @precedence { Placeholder, PathSegment } + Placeholder { ":" ![/?#]+ } + PathSegment { ![?#/]+ } + @precedence { Placeholder, PathSegment } + + queryPair { ($[a-zA-Z0-9]+ ("=" $[a-zA-Z0-9]*)?) } } @external propSource highlight from "./highlight" diff --git a/src-web/components/core/Editor/url/url.ts b/src-web/components/core/Editor/url/url.ts index 02d395a3..b16dc3b8 100644 --- a/src-web/components/core/Editor/url/url.ts +++ b/src-web/components/core/Editor/url/url.ts @@ -3,17 +3,17 @@ import {LRParser} from "@lezer/lr" import {highlight} from "./highlight" export const parser = LRParser.deserialize({ version: 14, - states: "#SOQOPOOQYOPOOOTOPOOOeOQO'#CeOmOPO'#CaOxOSO'#CdQOOOOOQ`OPOOQ]OPOOOOOO,59P,59POOOO-E6c-E6cO}OPO,59OO!VOSO'#CfO![OPO1G.jOOOO,59Q,59QOOOO-E6d-E6d", - stateData: "!j~OQQORPO~OSWO[RO]TO~OUXOVXO~O[ROZTX]TX~O^ZO~O_[OZWa~O^^O~O_[OZWi~OQRUVU~", - goto: "rZPPPPP[PP`elTVPWVUPVWSSPWRYSQ]ZR_]", - nodeNames: "⚠ url Protocol Host Port Path Placeholder PathSegment Query", - maxTerm: 15, + states: "!|OQOPOOQYOPOOOTOPOOObOQO'#CdOjOPO'#C`OuOSO'#CcQOOOOOQ]OPOOOOOO,59O,59OOOOO-E6b-E6bOzOPO,58}O!SOSO'#CeO!XOPO1G.iOOOO,59P,59POOOO-E6c-E6c", + stateData: "!g~OQQORPO~OZRO[TO~OTWOUWO~OZROYSX[SX~O]YO~O^ZOYVa~O]]O~O^ZOYVi~OQRTUT~", + goto: "nYPPPPZPP^bhRVPTUPVQSPRXSQ[YR^[", + nodeNames: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T!j#T#o#r#o;'S!j;'S;=`#R<%lO!jP.aP!P!Q.dP.iOQP", tokenizers: [0, 1, 2], topRules: {"url":[0,1]}, - tokenPrec: 66, - termNames: {"0":"⚠","1":"@top","2":"Protocol","3":"Host","4":"Port","5":"Path","6":"Placeholder","7":"PathSegment","8":"Query","9":"(\"/\" (Placeholder | PathSegment))+","10":"(\"&\" queryPair)+","11":"␄","12":"\"/\"","13":"\"?\"","14":"queryPair","15":"\"&\""} + tokenPrec: 63 }) +