react pre标签内代码不换行问题

react 使用hightlight.js 显示<pre><code>标签内的代码时不换行,显示如下:

JSX会换行,代码更改为:

<pre>
<code>
{` 
; boilerplate
[package]
name = "some_name"
authors = ["Author"]
description = "This is a description"
`}
</code>
</pre>
界面显示为:
posted @ 2018-10-15 11:06  小小鱼丸  阅读(2175)  评论(0编辑  收藏  举报