wocommunity / wolips

wolips
53 stars 53 forks source link

WOL-1131 HTML formatter: Preserve line breaks within tags #78

Closed pascalrobert closed 12 years ago

pascalrobert commented 12 years ago

Reported by Timo Höpfner

I'm heavily using inline bindings. When there are many bindings, I'm often formatting the tags like:

<wo:ERXOptGroupPopupButton list="$poolDefinitions" item="$poolDefinitionItem" group="$poolDefinitionItem.definition" label="$poolDefinitionItem.definition.identifier" displayString="$poolDefinitionItem.displayName" noSelectionString="---" selection="$selectedPool" />

Formatting makes that a single line again, so it would be nice, if the formatter had an option to preserve the line breaks within tags.

qdolan commented 12 years ago

The way the formatting works this isn't possible. The document is parsed into a document model and then re-rendered using a formatter delegate directly from the DOM, any internal formatting within a tag is lost when it is parsed.

If you have enough attributes in a tag that you need to format it this way to be readable, then you probably shouldn't be using inline bindings.