We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f3798 commit 7db0fb3Copy full SHA for 7db0fb3
src/re.rs
@@ -780,7 +780,7 @@ impl<'t> Captures<'t> {
780
pub fn expand(&self, text: &str) -> String {
781
// How evil can you get?
782
// FIXME: Don't use regexes for this. It's completely unnecessary.
783
- let re = Regex::new(r"(^|[^$]|\b)\$(\w+)").unwrap();
+ let re = Regex::new(r"(^|[^$]|\b)\$(\d+|\w+)").unwrap();
784
let text = re.replace_all(text, |refs: &Captures| -> String {
785
let pre = refs.at(1).unwrap_or("");
786
let name = refs.at(2).unwrap_or("");
0 commit comments