Write # in yaml (in the string)

我与影子孤独终老i 提交于 2019-12-22 01:25:17

问题


I'm new using yml files (for translations in my framework).

I'm trying to add a "#" inside the translation (will be a twitter share... blabla).

Is this possible, because the file translate it like a comment...


回答1:


Just put the value inside single or double quotes and it won't be treated like a comment. Something like:

en:
  twitter:
    share: "#hashtag"


来源:https://stackoverflow.com/questions/13711444/write-in-yaml-in-the-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!