Reformat breaks HTML/XML tags

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
danglund
Posts: 7
Joined: Mon Jul 14, 2003 9:39 am

Reformat breaks HTML/XML tags

Post 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
--
danglund
Posts: 7
Joined: Mon Jul 14, 2003 9:39 am

Found the solution

Post 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
--
Post Reply