diff options
author | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2006-04-17 06:42:08 +0000 |
---|---|---|
committer | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2006-04-17 06:42:08 +0000 |
commit | 4e78012403a451090b72af539df0d976e8148ec4 (patch) | |
tree | 41e5161c84b42d0ad50f189b57528dd3c249ff1b | |
parent | a56d81985b7f9d27f770e4ec312f224a2a6a30ba (diff) | |
download | pyyaml-4e78012403a451090b72af539df0d976e8148ec4.tar.gz |
Fix #4 (Thanks to murphy(at)rubychan.de)
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@138 18f92427-320e-0410-9341-c67f048884a3
-rw-r--r-- | lib/yaml/scanner.py | 1 | ||||
-rw-r--r-- | tests/data/scan-document-end-bug.canonical | 3 | ||||
-rw-r--r-- | tests/data/scan-document-end-bug.data | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py index e9780c4..30add9e 100644 --- a/lib/yaml/scanner.py +++ b/lib/yaml/scanner.py @@ -701,7 +701,6 @@ class Scanner: # DOCUMENT-END: ^ '...' (' '|'\n') if self.column == 0: - prefix = self.peek(4) if self.prefix(3) == u'...' \ and self.peek(3) in u'\0 \t\r\n\x85\u2028\u2029': return True diff --git a/tests/data/scan-document-end-bug.canonical b/tests/data/scan-document-end-bug.canonical new file mode 100644 index 0000000..4a0e8a8 --- /dev/null +++ b/tests/data/scan-document-end-bug.canonical @@ -0,0 +1,3 @@ +%YAML 1.1 +--- +!!null "" diff --git a/tests/data/scan-document-end-bug.data b/tests/data/scan-document-end-bug.data new file mode 100644 index 0000000..3c70543 --- /dev/null +++ b/tests/data/scan-document-end-bug.data @@ -0,0 +1,3 @@ +# Ticket #4 +--- +...
\ No newline at end of file |