maven-doxia icon indicating copy to clipboard operation
maven-doxia copied to clipboard

Fix snippet reader tab and indent handling

Open Jotschi opened this issue 1 year ago • 15 comments

The PR addresses the following issues:

  • The snippet reader did not correctly apply the indentation for snippet sources which were indented using tabs. The minIndent calculation only checked spaces.

Snippet Source:

[tab][tab]line

Old Behaviour

[tab][tab]line

New Behaviour:

line
  • The snippet reader minIndent calculation was always 0 whenever the snippet contained empty newlines. Those empty lines will now correctly be handled.

Snippet Source:

[space][space]line1
[\n]
[space]line2

Old Behaviour

[space][space]line1
[\n]
[space]line2

New Behaviour:

line1
[\n]
[space]line2

Jotschi avatar Mar 30 '23 09:03 Jotschi