diff --git a/apps/test/content/posts/tabs-comprehensive-test.md b/apps/test/content/posts/tabs-comprehensive-test.md index 0e8c25f9..0f17b9a0 100644 --- a/apps/test/content/posts/tabs-comprehensive-test.md +++ b/apps/test/content/posts/tabs-comprehensive-test.md @@ -13,7 +13,18 @@ tags: Testing various configurations and nested scenarios for the Tabs shortcode. {{< tabs >}} -{{% tab title="Test Cases" %}}See Types section for various test cases.{{% /tab %}} +{{% tab title="Test Cases" %}} +See Types section for various test cases. + +```go-template {name="Shortcode"} +{{}} +{{%/* tab title="Test Cases" */%}} +{{%/* tab title="Test Cases" */%}}See Types section for various test cases.{{%/* /tab */%}} +{{%/* tab title="Nested Tabs" */%}}See Nested Tabs section for examples.{{%/* /tab */%}} +{{}} +``` + +{{% /tab %}} {{% tab title="Nested Tabs" %}}See Nested Tabs section for examples.{{% /tab %}} {{< /tabs >}} diff --git a/assets/scss/core/maps/_chroma-lexers.scss b/assets/scss/core/maps/_chroma-lexers.scss index e255e25c..f34ad830 100644 --- a/assets/scss/core/maps/_chroma-lexers.scss +++ b/assets/scss/core/maps/_chroma-lexers.scss @@ -34,6 +34,7 @@ $chroma-lexers: ( "as": "ActionScript", "as3": "ActionScript 3", "asm": "GAS", + "astro": "Astro", "atl": "ATL", "autohotkey": "AutoHotkey", "autoit": "AutoIt", @@ -172,7 +173,7 @@ $chroma-lexers: ( "haskell": "Haskell", "haxe": "Haxe", "hbs": "Handlebars", - "hcl": "HCL", + "hcl": "Terraform", "hexdump": "Hexdump", "hlb": "HLB", "hlsl": "HLSL", @@ -184,9 +185,12 @@ $chroma-lexers: ( "html\\+kid": "Genshi HTML", "html\\+ruby": "ERB", "http": "HTTP", + "hurl": "Hurl", "hx": "Haxe", "hxsl": "Haxe", "hylang": "Hy", + "hypr": "Hyprlang", + "hyprlang": "Hyprlang", "idr": "Idris", "idris": "Idris", "igor": "Igor", @@ -201,6 +205,7 @@ $chroma-lexers: ( "javascript": "JavaScript", "jinja": "Django/Jinja", "jl": "Julia", + "jq": "JQ", "js": "JavaScript", "json": "JSON", "jsonata": "JSONata", @@ -425,6 +430,7 @@ $chroma-lexers: ( "tasm": "TASM", "tcl": "Tcl", "tcsh": "Tcsh", + "templ": "Templ", "termcap": "Termcap", "terminfo": "Terminfo", "terraform": "Terraform", @@ -483,6 +489,7 @@ $chroma-lexers: ( "zsh": "Bash", "µcad": "Microcad", // Custom code type + "go-html-template": "Go HTML Template", "markdown": "Markdown", "yml": "YAML" ) !default; diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index fc390fa3..3f5c5c23 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v1.0.0-mraakpxu" -}} +{{- hugo.Store.Set "version" "v1.0.0-mrevbfi8" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/_shortcodes/tab.html b/layouts/_shortcodes/tab.html index 5435aac5..da7d1ff7 100644 --- a/layouts/_shortcodes/tab.html +++ b/layouts/_shortcodes/tab.html @@ -9,7 +9,8 @@ {{- $id := dict "Page" .Page | partial "function/id.html" -}} {{- $title := .Get "title" -}} {{- .Parent.Store.Add "tabs" (slice (dict "title" $title "id" $id)) -}} +{{- $content := trim .Inner "\r\n" -}} {{- /* Tab panel */ -}} -
{{ .Inner | strings.TrimSpace | .Page.RenderString }}
+
{{ $content | safeHTML }}
{{- /* EOF */ -}} diff --git a/layouts/_shortcodes/tabs.html b/layouts/_shortcodes/tabs.html index 3655f187..f76f91fe 100644 --- a/layouts/_shortcodes/tabs.html +++ b/layouts/_shortcodes/tabs.html @@ -1,11 +1,11 @@ {{- /* Renders a tabbed interface with multiple tabs and their corresponding content. See https://fixit.lruihao.cn/documentation/content-management/shortcodes/extended/tabs/ - + @param {Int} [defaultTab=0] - The index of the tab to be active by default (0-based) @param {String} [type="underline"] - The style type of the tabs ("underline", "pill", "card", "segment", etc.) @param {String} [placement="top"] - The placement of the tabs ("top", "bottom", "left", "right") - + Usage: {{< tabs defaultTab="1" type="card" placement="top" >}} {{% tab title="Tab 1" %}} @@ -15,7 +15,7 @@ Content for Tab 2 {{% /tab %}} {{< /tabs >}} - + Note: Tabs must be defined using the nested "tab" shortcode within the "tabs" shortcode. */ -}} @@ -47,7 +47,7 @@ {{- $id := $tab.id -}} {{- end -}} - {{- .Inner | strings.TrimSpace | .Page.RenderString -}} + {{- .Inner -}} diff --git a/packages/chroma-lexers/src/custom-types.ts b/packages/chroma-lexers/src/custom-types.ts index 0bface92..7bb0754a 100644 --- a/packages/chroma-lexers/src/custom-types.ts +++ b/packages/chroma-lexers/src/custom-types.ts @@ -2,6 +2,7 @@ * Custom code types that are not in Chroma's built-in lexer definitions. */ export const customCodeTypes: Record = { - markdown: 'Markdown', - yml: 'YAML', + 'go-html-template': 'Go HTML Template', + 'markdown': 'Markdown', + 'yml': 'YAML', }