chore: generate
This commit is contained in:
parent
78a5a030ce
commit
f8ceb30b43
3 changed files with 7 additions and 3 deletions
|
|
@ -4,7 +4,9 @@ import { inlineCodeKind } from "./markdown-inline-code-kind"
|
||||||
describe("inlineCodeKind", () => {
|
describe("inlineCodeKind", () => {
|
||||||
test("leaves code expressions as normal inline code", () => {
|
test("leaves code expressions as normal inline code", () => {
|
||||||
expect(
|
expect(
|
||||||
inlineCodeKind(`case "question.asked": ... input.setStore("question", question.sessionID, [question]) / splice/insert`),
|
inlineCodeKind(
|
||||||
|
`case "question.asked": ... input.setStore("question", question.sessionID, [question]) / splice/insert`,
|
||||||
|
),
|
||||||
).toBeUndefined()
|
).toBeUndefined()
|
||||||
expect(inlineCodeKind(`<SessionQuestionDock request={request} ... />`)).toBeUndefined()
|
expect(inlineCodeKind(`<SessionQuestionDock request={request} ... />`)).toBeUndefined()
|
||||||
expect(inlineCodeKind(`from sync.data.question + sync.data.session.`)).toBeUndefined()
|
expect(inlineCodeKind(`from sync.data.question + sync.data.session.`)).toBeUndefined()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ export function inlineCodeKind(text: string): "path" | "url" | undefined {
|
||||||
if (
|
if (
|
||||||
/[/\\]/.test(text) ||
|
/[/\\]/.test(text) ||
|
||||||
/^\.\.?[/\\]/.test(text) ||
|
/^\.\.?[/\\]/.test(text) ||
|
||||||
/\.(tsx?|jsx?|json|py|go|rs|rb|php|css|html|md|sh|ya?ml|toml|sql|c|cpp|h|java|kt|swift|scala|xml|png|jpe?g|gif|svg|ico)$/i.test(text)
|
/\.(tsx?|jsx?|json|py|go|rs|rb|php|css|html|md|sh|ya?ml|toml|sql|c|cpp|h|java|kt|swift|scala|xml|png|jpe?g|gif|svg|ico)$/i.test(
|
||||||
|
text,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
return "path"
|
return "path"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -283,4 +283,4 @@
|
||||||
--color-v2-state-bg-info: var(--v2-state-bg-info);
|
--color-v2-state-bg-info: var(--v2-state-bg-info);
|
||||||
--color-v2-state-fg-info: var(--v2-state-fg-info);
|
--color-v2-state-fg-info: var(--v2-state-fg-info);
|
||||||
--color-v2-state-border-info: var(--v2-state-border-info);
|
--color-v2-state-border-info: var(--v2-state-border-info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue