Skip to content

Commit 298ad08

Browse files
Add support for Slang template (#18565)
## Summary Slang is basically a Slim template language for Crystal language, so the very same Slim parser works fine. Slim template: https://github.com/slim-template/slim Slang template: https://github.com/jeromegn/slang ## Test plan Create a simple slang file with some tailwind-css and check if the CSS is being extracted: ```slim doctype html html head title This is a title body.min-h-screen header.stick.top-0.z-10 section.max-w-4xl.mx-auto.p-4.flex.items-center.justify-between h1.text-3xl.font-medium This is a slang file ``` To test it, get any slim template, rename the extension to .slang Fixes #17851 --------- Co-authored-by: Jordan Pittman <[email protected]>
1 parent 03aff9e commit 298ad08

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Handle when `process.env.DEBUG` is a boolean in `@tailwindcss/node` ([#18485](https://github.com/tailwindlabs/tailwindcss/pull/18485))
1717
- Ignore consecutive semicolons in the CSS parser ([#18532](https://github.com/tailwindlabs/tailwindcss/pull/18532))
1818
- Center the dropdown icon added to an input with a paired datalist ([#18511](https://github.com/tailwindlabs/tailwindcss/pull/18511))
19+
- Extract candidates in Slang templates ([#18565](https://github.com/tailwindlabs/tailwindcss/pull/18565))
1920

2021
## [4.1.11] - 2025-06-26
2122

crates/oxide/src/scanner/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ pub fn pre_process_input(content: &[u8], extension: &str) -> Vec<u8> {
488488
"json" => Json.process(content),
489489
"pug" => Pug.process(content),
490490
"rb" | "erb" => Ruby.process(content),
491-
"slim" => Slim.process(content),
491+
"slim" | "slang" => Slim.process(content),
492492
"svelte" | "rs" => Svelte.process(content),
493493
"vue" => Vue.process(content),
494494
_ => content.to_vec(),

0 commit comments

Comments
 (0)