The same characters which cause wrapping normally will also cause wrapping with white-space: pre-wrap;
, with the addition that newlines in the text will also cause newlines in the output.
Try removing white-space: pre-wrap;
in your example and you will see that the only change is that there are no longer any blank lines. Otherwise the wrapping behaviour is the same.
See: https://drafts.csswg.org/css-text/#valdef-white-space-pre-wrap
pre-wrap: Like 'pre', this value preserves white space; but like 'normal', it allows wrapping.
For more details about when wrapping can occur normally, see: https://drafts.csswg.org/css-text/#line-breaking
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…