greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

Psych::SyntaxError: (<unknown>): couldn't parse YAML #22

Open petRUShka opened 12 years ago

petRUShka commented 12 years ago

When I'm trying to use vim-preview I catch following error:

Error detected while processing function <SNR>77_Preview..preview#show:
line    4:
Psych::SyntaxError: (<unknown>): couldn't parse YAML at line 182 column 9

I think the reason is similar to reason of same rails bug: http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml. Quote:

The root cause was described on many places and I will summarize it again. There are two default yaml parser Psych is the new one, the one you should be using. Syck is the old one, its not maintained and dying, its currently used as fall back for when there is no libyaml present (non-linux systems usually). The important thing is you have some invalid yaml somewhere. It is most probably in your translation files (I had unquoted strings strating with %). Just try loading all your yml files with YAML.load_file on the production box and you will see which one is the broken one.

greyblake commented 12 years ago

Hi. Thanks for the report. I am a little confused. If I understand right the bug caused by RedCloth. Vim-preview doesn't use yaml explicitly. I think the one possible solution is to allow user to specify another library for textile.