chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-26 08:06:37 +00:00
commit f8ceb30b43
3 changed files with 7 additions and 3 deletions

View file

@ -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()

View file

@ -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"
} }