From 27221622b04c92c39a2a97c1836ee932f91f0cbf Mon Sep 17 00:00:00 2001 From: Stepan Urazov <110625288+atlasgorn@users.noreply.github.com> Date: Mon, 26 May 2025 20:52:59 +0300 Subject: [PATCH] Added support for .wesl files to the regex pattern for examples (#19178) ## Objective [Shaders / Material - WESL](https://bevyengine.org/examples-webgpu/shaders/shader-material-wesl/) example doesn't have a WESL file tab ## Solution Added wesl to regex --------- Co-authored-by: Stepan Urazov <110625288+hg127@users.noreply.github.com> --- tools/example-showcase/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/example-showcase/src/main.rs b/tools/example-showcase/src/main.rs index c8feff1050..6fa24b1a27 100644 --- a/tools/example-showcase/src/main.rs +++ b/tools/example-showcase/src/main.rs @@ -773,9 +773,7 @@ fn parse_examples() -> Vec { let technical_name = val.get("name").unwrap().as_str().unwrap().to_string(); let source_code = fs::read_to_string(val["path"].as_str().unwrap()).unwrap(); - let shader_regex = - Regex::new(r"(shaders\/\w+\.wgsl)|(shaders\/\w+\.frag)|(shaders\/\w+\.vert)") - .unwrap(); + let shader_regex = Regex::new(r"shaders\/\w+\.(wgsl|frag|vert|wesl)").unwrap(); // Find all instances of references to shader files, and keep them in an ordered and deduped vec. let mut shader_paths = vec![];