diff --git a/.changeset/lemon-plants-vanish.md b/.changeset/lemon-plants-vanish.md new file mode 100644 index 000000000..0887b10be --- /dev/null +++ b/.changeset/lemon-plants-vanish.md @@ -0,0 +1,8 @@ +--- +"@gitbook/react-openapi": patch +"gitbook-v2": patch +"gitbook": patch +"@gitbook/colors": patch +--- + +Fix code highlighting for HTTP diff --git a/packages/gitbook/src/components/DocumentView/CodeBlock/theme.css b/packages/gitbook/src/components/DocumentView/CodeBlock/theme.css index 21c0fd579..5e4a73a88 100644 --- a/packages/gitbook/src/components/DocumentView/CodeBlock/theme.css +++ b/packages/gitbook/src/components/DocumentView/CodeBlock/theme.css @@ -5,7 +5,7 @@ --shiki-token-link: theme("colors.primary.10"); --shiki-token-constant: theme("colors.warning.10"); - --shiki-token-string: theme("colors.success.10"); + --shiki-token-string: theme("colors.warning.10"); --shiki-token-string-expression: theme("colors.success.10"); --shiki-token-keyword: theme("colors.danger.10"); --shiki-token-parameter: theme("colors.warning.10"); @@ -24,7 +24,7 @@ --shiki-token-link: theme("colors.primary.11"); --shiki-token-constant: theme("colors.warning.11"); - --shiki-token-string: theme("colors.success.11"); + --shiki-token-string: theme("colors.warning.11"); --shiki-token-string-expression: theme("colors.success.11"); --shiki-token-keyword: theme("colors.danger.11"); --shiki-token-parameter: theme("colors.warning.11"); @@ -41,7 +41,7 @@ html.dark { --shiki-token-comment: theme("colors.neutral.9"); --shiki-token-constant: theme("colors.warning.11"); - --shiki-token-string: theme("colors.success.11"); + --shiki-token-string: theme("colors.warning.11"); --shiki-token-string-expression: theme("colors.success.11"); --shiki-token-keyword: theme("colors.danger.11"); --shiki-token-parameter: theme("colors.warning.11"); diff --git a/packages/react-openapi/src/code-samples.ts b/packages/react-openapi/src/code-samples.ts index a6c79fd5c..50c6a9204 100644 --- a/packages/react-openapi/src/code-samples.ts +++ b/packages/react-openapi/src/code-samples.ts @@ -30,7 +30,7 @@ export const codeSampleGenerators: CodeSampleGenerator[] = [ { id: 'http', label: 'HTTP', - syntax: 'bash', + syntax: 'http', generate: ({ method, url, headers = {}, body }: CodeSampleInput) => { const { host, path } = parseHostAndPath(url);