#2789·react-pdf

字符串开头的空格不会对 <Text /> 组件进行渲染

作者: TomSenapatiInfluence创建于 2024年6月14日更新于 2026年9月19日
标签bug

**Describe the bug** Spaces at the beginning of strings inside Text components are not being reproduced into the rendered pdf. Instead, the text node begins with the first character of the string. If a string starts with multiple spaces, only a single space is rendered in the pdf. Similarly, if a string starts with any number of spaces, followed by a number/special character, the spaces are completely ignored. The only case that seems to render accurately is if the string starts with a single space, followed by an a-z character.

内容来源: diegomura/react-pdf