Google chrome extension 如何在Chrome.i18n消息字符串中添加换行符

Google chrome extension 如何在Chrome.i18n消息字符串中添加换行符,google-chrome-extension,Google Chrome Extension,标题说明了一切。在中,如何添加换行符以使世界显示在新行上 { "search_string": { "message": "hello world", "description": "The string we search for. Put %20 between words that go together." }, ... } 我尝试过的事情 "message": "hello\\nworld" "message": "hello&

标题说明了一切。在中,如何添加换行符以使世界显示在新行上

  {
    "search_string": {
      "message": "hello world",
      "description": "The string we search for. Put %20 between words that go together."
    },
    ...
  }
我尝试过的事情

"message": "hello\\nworld"
"message": "hello<br>world"
"message": "hello\u000dworld"
“消息”:“你好\\nworld”
“消息”:“你好
世界” “消息”:“你好\u000dworld”
在JSON字符串中,您可以使用
\n
。问题很可能是元素的CSS:它必须有类似于
空白:pre-line
的内容。虽然我没有尝试过,但根据这篇
“key\u with_-line-break”:{“message”:“此翻译包含\n换行符。”}
以上应该可以。