diff --git a/lib/js-yaml/dumper.js b/lib/js-yaml/dumper.js
index <HASH>..<HASH> 100644
--- a/lib/js-yaml/dumper.js
+++ b/lib/js-yaml/dumper.js
@@ -226,9 +226,12 @@ function writeScalar(state, object, level) {
   spaceWrap = (CHAR_SPACE === first ||
                CHAR_SPACE === object.charCodeAt(object.length - 1));
 
-  // A string starting with - or ? may be introducing a magic yaml thing.
-  // Err on the side of caution and never treat these as simple scalars.
-  if (CHAR_MINUS === first || CHAR_QUESTION === first) {
+  // Simplified check for restricted first characters
+  // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29
+  if (CHAR_MINUS         === first ||
+      CHAR_QUESTION      === first ||
+      CHAR_COMMERCIAL_AT === first ||
+      CHAR_GRAVE_ACCENT  === first) {
     simple = false;
   }
 
@@ -485,9 +488,7 @@ function simpleChar(character) {
          CHAR_SINGLE_QUOTE         !== character &&
          CHAR_DOUBLE_QUOTE         !== character &&
          CHAR_PERCENT              !== character &&
-         CHAR_COMMERCIAL_AT        !== character &&
          CHAR_COLON                !== character &&
-         CHAR_GRAVE_ACCENT         !== character &&
          !ESCAPE_SEQUENCES[character]            &&
          !needsHexEscape(character);
 }
Dumper: allow use of reserved chars in middle of plain scalars