more covenient <cseignore>

For topics about current BETA or future releases, including feature requests.

more covenient <cseignore>

Postby roedygr » Wed Nov 30, 2011 11:43 am

It would be nice if I did not have to put <cseignore> in my markup. It bulks things up. It confounds other tools. It is too big a hammer.

What would be nice if you could give HTMLValidator a list of style classes, and tell it that in those styles:

1. turn off spell checking
2. turn off high letter check
3. turn off selected error messages.

Choosing just what you wanted to turn off.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 249
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: more covenient <cseignore>

Postby Albert Wiersch » Wed Nov 30, 2011 12:10 pm

If you use the comment forms, it should not bother other tools - <!--cseignore--> and <!--/cseignore-->.

In v11, you can use the onCommentHTML() function in a user functions file to run a custom program based on the contents of an HTML comment. This gives you a lot of customization ability but requires a little programming.

Here is the example function from the documentation (the HTML comment text is stored in $commentstring):

Code: Select all
function onHTMLComment() {
 MessageEx(13|1024,2011083000,MSG_COMMENT,'HTML comment: '+$commentstring);
 if beginsWithCase($commentstring,"!--SETMYOPTION_") {
  if matchCase($commentstring,"!--SETMYOPTION_EXTRACHECKING--") {
   #myoption_extrachecking=true;
   MessageEx(13|1024,2011083001,MSG_COMMENT,'Extra checking enabled!');
  }
  else { if matchCase($commentstring,"!--SETMYOPTION_LOOSECHECKING--") {
   #myoption_loosechecking=true;
   MessageEx(13|1024,2011083002,MSG_COMMENT,'Loose checking enabled!');
  }}
 }
}


See the documentation for more information.

Also, you can't disable the "high letter check" for only parts of the document. That feature is carried over from the very early versions of the program and the "early" days of the web. Generally documents today should be (or are) UTF-8 and that check should not apply.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2435
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE BETA Talk

Who is online

Users browsing this forum: No registered users and 2 guests