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>
This commit is contained in:
Stepan Urazov 2025-05-26 20:52:59 +03:00 committed by GitHub
parent d1f6470cc2
commit 53f1c06e63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -773,9 +773,7 @@ fn parse_examples() -> Vec<Example> {
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![];