esthetic icon indicating copy to clipboard operation
esthetic copied to clipboard

New Markup Rule: stripTextWrapLines

Open panoply opened this issue 1 year ago • 0 comments

Description

Introducing the stripTextWrapLines rule, which can be used to either preserve or remove newlines containing within text content regions. By default, this rule is set to false meaning newlines will be preserved in accordance with the global preserveLine rule.

stripTextWrapLines

Whether or not Æsthetic should strip newline occurrences when applying word-wrap on text content. This rule will only take effect if a word wrap limit has been defined via wrap option. When enabled, Æsthetic will remove newline occurrences from text identified content and produce a strictly formed wrap. By default, this rule is false and Æsthetic will preserve newlines within text content, ensuring that newline occurrences adhere to the preserveLine limit regardless of whether or not a wrap limit has been set. Setting this to true will override preserveLine within text specific content and instead refer to the wrap limitation.

NOTE If you have set preserveText to true this rule will be ignored, as preserveText take precedence and will override all text content related formatting options.

Example

Let's say we have set wrap to 50 and we have the following text content.

Lorem ipsum, dolor sit amet consectetur adipisicing elit. 

Facilis quasi corrupti ipsam impedit nostrum odio, 

If the stripTextWrapLines is true

Lorem ipsum, dolor sit amet consectetur 
adipisicing elit. Facilis quasi corrupti 
ipsam impedit nostrum odio, 

panoply avatar May 21 '24 15:05 panoply