Fix code highlighting for HTTP (#3214)

This commit is contained in:
Greg Bergé
2025-05-06 15:41:15 +02:00
committed by GitHub
parent a3ec264764
commit 5e975ab95b
3 changed files with 12 additions and 4 deletions
+8
View File
@@ -0,0 +1,8 @@
---
"@gitbook/react-openapi": patch
"gitbook-v2": patch
"gitbook": patch
"@gitbook/colors": patch
---
Fix code highlighting for HTTP
@@ -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");
+1 -1
View File
@@ -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);