diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-01 22:16:09 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-01 22:16:09 -0700 |
commit | 48e40252b005e3c37e3e5c087daf4f14657295f6 (patch) | |
tree | 00e1d10fc9c3b9f2abde3c605011e14db43d12ba /013literal_string.cc | |
parent | 5257d0b41aa111b732796c190077af27a55cf905 (diff) | |
download | mu-48e40252b005e3c37e3e5c087daf4f14657295f6.tar.gz |
1913 - save expected response for each sandbox
Diffstat (limited to '013literal_string.cc')
-rw-r--r-- | 013literal_string.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/013literal_string.cc b/013literal_string.cc index 8054d60f..92dc75ca 100644 --- a/013literal_string.cc +++ b/013literal_string.cc @@ -132,11 +132,14 @@ if (s.at(0) == '[') { //: b) Escape newlines in the string to make it more friendly to trace(). :(after "string reagent::to_string()") - if (!properties.at(0).second.empty() && properties.at(0).second.at(0) == "literal-string") { + if (is_literal_string(*this)) return emit_literal_string(name); - } :(code) +bool is_literal_string(const reagent& x) { + return !x.properties.at(0).second.empty() && x.properties.at(0).second.at(0) == "literal-string"; +} + string emit_literal_string(string name) { size_t pos = 0; while (pos != string::npos) |