Page 1 of 1

Reformat breaks HTML/XML tags

Posted: Mon May 10, 2004 2:17 pm
by danglund
In my Textpad 4.72 I have separate Document classes for C, XML and HTML with these settings.

- Maintain indentation: yes
- Word wrap long lines: no
- Word wrapped text: Save with no breaks in lines
- Word break at column number: 79

I frequently use the Ctrl-Shift-J (Edit->Reformat) command to create nicely formatted blocks of code stopping at line 80. Is it possible to stop Textpad from braking HTML/XML tags? E.g.:

Code: Select all

... this line is very long and ending at column 80</td></tr></ta
ble>
Obviously this brakes the HTML since the </table> tag is broken over two lines. Are there any sollution to this?

Dan
--

Found the solution

Posted: Wed May 12, 2004 11:02 am
by danglund
I finally figured this out. I post my solution here for future reference.

The problem was that my document class for XML and HTML only considered the letters [a-zA-Z0-9] and _ as being part of a word. To solve this I needed to add the letters </>="#.

- Configure->Preferences
- Document Classes->XML->Syntax
- Other characters in words: _</>="#

Dan
--