{
final CSSValue wordBreak = layoutContext.getValue(TextStyleKeys.TEXT_WRAP);
if (TextWrap.NONE.equals(wordBreak))
{
// surpress all but the linebreaks. This equals the 'pre' mode of HTML
return new LineBreakProducer();
}
// allow other breaks as well. The wordbreak producer does not perform
// advanced break-detection (like syllable based breaks).
return new WordBreakProducer();