Skip to content

Conversation

@aepfli
Copy link
Contributor

@aepfli aepfli commented Dec 22, 2025

closes: #387

@aepfli aepfli marked this pull request as ready for review December 22, 2025 15:49
@tyranron tyranron added enhancement Improvement of existing features or bugfix k::UI/UX UI (user interface) and UX (user experience) changes labels Dec 23, 2025
@tyranron tyranron added this to the 0.22.1 milestone Dec 23, 2025
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aepfli thank you for noticing this and taking time and effort to look into this!

src/feature.rs Outdated
#[expect(clippy::unwrap_used, reason = "regex is valid")]
static TEMPLATE_REGEX: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"<([^>\s]+)>").unwrap());
LazyLock::new(|| Regex::new("<([^>]+)>").unwrap());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aepfli allowing spaces seems ok, but does it mean we should also allow \t, \r, \n and other "brothers"?

I think it's only meaningful to allow spaces strictly. And only between non-space characters. Otherwise, this regex allows < > placeholder, which is weird.

@tyranron tyranron merged commit c096f70 into cucumber-rs:main Dec 23, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of existing features or bugfix k::UI/UX UI (user interface) and UX (user experience) changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[possible bug] example references containing spaces are not substituted in rust implementation

2 participants