From 48e40252b005e3c37e3e5c087daf4f14657295f6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 1 Aug 2015 22:16:09 -0700 Subject: 1913 - save expected response for each sandbox --- 013literal_string.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '013literal_string.cc') 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) -- cgit 1.4.1-2-gfad0