You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following (with and without the hyphenationCallback prop) leads to hyphenation:
<Document>
<Page style={styles.body}>
<Text style={styles.text} hyphenationCallback={(word => [word])}>
This tests that hyphenation doesn't work right in this case and now I need to report it ({word})
</Text>
</Page>
</Document>
Result:
While with the word inline, this does not happen.
To Reproduce
const word = "somelongword";
const Quixote = () => (
<Document>
<Page style={styles.body}>
<Text style={styles.text} hyphenationCallback={(word => [word])}>
This tests that hyphenation doesn't work right in this case and now I need to report it ({word})
</Text>
</Page>
</Document>
);
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 65,
paddingHorizontal: 35,
},
text: {
margin: 12,
fontSize: 14,
textAlign: 'justify',
fontFamily: 'Times-Roman'
},
});
ReactPDF.render(<Quixote />);
Expected behavior
No hyphenation is happening, especially with the provided hyphenationCallback. Note that putting the word variable inline (This tests that hyphenation doesn't work right in this case and now I need to report it (somelongword)) has the correct behaviour.
Screenshots
Desktop (please complete the following information):
Windows, Chrome, React-PDF REPL 4.1.5
The text was updated successfully, but these errors were encountered:
Describe the bug
The following (with and without the
hyphenationCallback
prop) leads to hyphenation:Result:
While with the word inline, this does not happen.
To Reproduce
Expected behavior
No hyphenation is happening, especially with the provided hyphenationCallback. Note that putting the
word
variable inline (This tests that hyphenation doesn't work right in this case and now I need to report it (somelongword)
) has the correct behaviour.Screenshots
Desktop (please complete the following information):
Windows, Chrome, React-PDF REPL 4.1.5
The text was updated successfully, but these errors were encountered: