Wordwrap and HTML char entities workaround

General questions about using TextPad

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

Post Reply
John Stewart

Wordwrap and HTML char entities workaround

Post by John Stewart »

While editing an HTML file in TP4.5, I found that the HTML character entity " was being treated like a word for the purpose of word wrap. If a line was broken at the ";" in &quot, I was ending up with an extra undesired space inserted after the ";". This space is displayed when the edited HTML is viewed in a web browser.

I tried some of the related suggestions I found here and THEY ALL FAILED - that is setting KeyWordChars in the html.syn file did nothing, and adding ";" to the "other characters" dialog under configure-> document->classes->html->syntax for the also did nothing.

What I found that worked was to edit two lines in html.syn

CharStart = &
CharEnd = ;

to

CharStart =
CharEnd =

The side effect is that HTML character entities are no-longer highlighted. That I can live with.
Andreas

Re: Wordwrap and HTML char entities workaround

Post by Andreas »

Have you tried this:

Under Configure/Preferences/Document Classes/HTML:

check Word Wrap long lines
select Save with no breaks in lines
John Steward

Re: Wordwrap and HTML char entities workaround

Post by John Steward »

Have you tried this:

Under Configure/Preferences/Document Classes/HTML:

check Word Wrap long lines
select Save with no breaks in lines

I didn't try that because I want the file to be nice to edit in other editors - so I want it to have line breaks in all the right places ;-)

-John
Post Reply