summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/poem/read/parse.rs4
-rw-r--r--src/poem/recite.rs5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/poem/read/parse.rs b/src/poem/read/parse.rs
index c1dec44..0836eea 100644
--- a/src/poem/read/parse.rs
+++ b/src/poem/read/parse.rs
@@ -31,6 +31,10 @@ macro_rules! string {
match $chars.next() {
None => return Err(Mishap::PartialMishap($j, $i, $c)),
Some(c) if c == token => break,
+ Some(c) if token == '\'' && c == '$' => {
+ $word.push('\x0e');
+ $i += 1;
+ }
Some(c) => {
$word.push(c);
$i += 1;
diff --git a/src/poem/recite.rs b/src/poem/recite.rs
index d95af92..45d4d2e 100644
--- a/src/poem/recite.rs
+++ b/src/poem/recite.rs
@@ -52,6 +52,11 @@ impl Reciteable for Poem {
};
*word = word.replace(name.as_str(), envar.as_str());
}
+
+ // For any words in single quotes strings that began with a '$',
+ // need to replace the ASCII SO placeholder with the '$' char once
+ // more
+ *word = word.replace('\x0e', "$");
}
// Check for aliases