about summary refs log tree commit diff stats
path: root/tangle/003tangle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tangle/003tangle.cc')
-rw-r--r--tangle/003tangle.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/tangle/003tangle.cc b/tangle/003tangle.cc
index 3573c11f..7eb62f27 100644
--- a/tangle/003tangle.cc
+++ b/tangle/003tangle.cc
@@ -251,10 +251,13 @@ void slurp_tangle_string(istream& in, ostream& out) {
   in.get();
   char c;
   while (in >> c) {
-    if (c == '\\')  // only works for double-quotes
+    if (c == '\\') {
+      // skip backslash and save next character unconditionally
+      in >> c;
+      out << c;
       continue;
-    if (c == '"')
-      break;
+    }
+    if (c == '"') break;
     out << c;
   }
 }