Page 1 of 1

more covenient <cseignore>

PostPosted: Wed Nov 30, 2011 11:43 am
by roedygr
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.

Re: more covenient <cseignore>

PostPosted: Wed Nov 30, 2011 12:10 pm
by Albert Wiersch
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.