Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed include in test file. Fixed single letter map key support.

  • Loading branch information...
commit 8f7d83a6fa9c6e630da6486a2e87cbe4b093a697 1 parent 3e4ad4c
Diogo Costa authored January 21, 2012
2  tests/index.html
@@ -3,7 +3,7 @@
3 3
 <head>
4 4
     <meta charset="UTF-8">
5 5
     <title>YAML Parser</title>
6  
-    <script type="text/javascript" src="../src/yaml.js"></script>
  6
+    <script type="text/javascript" src="../src/yamlparser.js"></script>
7 7
     <script type="text/javascript">
8 8
         window.onload = function() {
9 9
             var test1 = YAML.eval("---\n- one\n- two");
2  yamlparser.js
@@ -47,7 +47,7 @@ var YAML =
47 47
             "map" : new RegExp("\\{\\s*(.*)\\s*\\}"),
48 48
             "key_value" : new RegExp("([a-z0-9_-][ a-z0-9_-]*):( .+)", "i"),
49 49
             "single_key_value" : new RegExp("^([a-z0-9_-][ a-z0-9_-]*):( .+?)$", "i"),
50  
-            "key" : new RegExp("([a-z0-9_-][ a-z0-9_-]+):( .+)?", "i"),
  50
+            "key" : new RegExp("([a-z0-9_-][ a-z0-9_-]*):( .+)?", "i"),
51 51
             "item" : new RegExp("^-\\s+"),
52 52
             "trim" : new RegExp("^\\s+|\\s+$"),
53 53
             "comment" : new RegExp("([^\\\'\\\"#]+([\\\'\\\"][^\\\'\\\"]*[\\\'\\\"])*)*(#.*)?")

0 notes on commit 8f7d83a

Please sign in to comment.
Something went wrong with that request. Please try again.