How can I escape % characters in YAML?
How can I escape % characters 开发者_如何学Pythonin YAML?
Try %%
it might work to escape.
put the string it in double quotes:
"%{var} some string"
If in doubt, try converting a string to yaml in IRB
C:\Documents and Settings\a.grimm>irb
irb(main):001:0> require "yaml"
=> true
irb(main):002:0> "I'm giving it 110%!".to_yaml
=> "--- I'm giving it 110%!\n"
irb(main):003:0> exit
精彩评论