Bug#669077: vim-runtime: yaml.vim syntax file misinterprets '#' within scalars as comments

Henry House hajhouse at houseag.com
Tue Apr 17 01:22:01 UTC 2012


Package: vim-runtime
Version: 2:7.2.445+hg~cb94c42c0e1a-1
Severity: minor

Hashes within strings are taken as the start of a comment by syntax file
yaml.vim, but this is not correct.

According to the YAML specification
(http://www.yaml.org/spec/1.2/spec.html#id2767100):

> 3.2.3.3. Comments
> 
> Comments are a presentation detail and must not have any effect on the
> serialization tree or representation graph. In particular, comments are
> not associated with a particular node. The usual purpose of a comment is
> to communicate between the human maintainers of a file. A typical
> example is comments in a configuration file. Comments must not appear
> inside scalars, but may be interleaved with such scalars inside
> collections. 

In other words, a hash within a string is not a comment delimiter. This
can be verified by inspecting the example YAML file at
http://www.yaml.org/start.html which includes this:

address:
        lines: |
            458 Walkman Dr.
            Suite #292
                 ^^^^ this isn't a comment, it's a literal # within the string

The # in the above example YAML file is incorrectly syntax-highlighted as a comment by yaml.vim.

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim-gtk [vim 2:7.2.445+hg~cb94c42c0e1a-1 Vi IMproved - enhanced vi editor -

vim-runtime suggests no packages.

-- debconf-show failed





More information about the pkg-vim-maintainers mailing list