Page 1 of 1

spell check comments

PostPosted: Tue Oct 04, 2011 5:28 am
by roedygr
In my html, oddly the comments are even more important than the HTML because they are for the most part macros that generate code.

It would be nice to configure the spell checker independently to either check comments yes/no, check text yes/no

Also my code is littered with Acronym expansions like this:

<span class="acronym">HTML</span> (<span class="means"><span class="ac">H</span>yper<span class="ac">T</span>ext <span class="ac">M</span>arkup <span class="ac">L</span>anguage</span>)

The spell checker chokes over and over on every one of them. Fixing that would be my #1 priority

Re: spell check comments

PostPosted: Sat Oct 08, 2011 6:05 pm
by MikeGale
I remember similar situations some time ago. (Can't remember the last time I faced it though.)

Looking at this post I had an idea that would provide a solution.

Provide a
Code: Select all
BeforeSpellCheck
event, and maybe a
Code: Select all
check-transformed-content-for-spelling
directive. This could be part of user defined functions.

In the function a user could remove what we see in this example. That is spans with a specific class (and the closer being the next item in line). The transformed result then gets passed to spell checker. (There are issues mapping that back to original source which I haven't considered.) For code like that calling external scripts or programs (with a callback?) might be an option worth considering. (There are other ideas too...)

If this were feasible it would provide a solution for edge cases like this.

Re: spell check comments

PostPosted: Sun Oct 09, 2011 7:54 am
by roedygr
I just downloaded beta 11. I was hoping this would not trigger spelling errors in the editor.

<a class="acronym jgloss" href="../jgloss/fud.html">FUD</a> (<span class="means"><span class="ac">F</span>ear <span class="ac">U</span>ncertainty and <span class="ac">D</span>oubt</span>

However, it does.

Re: spell check comments

PostPosted: Sun Oct 09, 2011 8:24 pm
by Albert Wiersch
Mike - I like the thought of using "user functions" for this, but in this case I don't think it would be practical at this point, also, it is an editor (not validator engine) issue with the editor's live spelling feature. The validator engine spelling message should not have this problem as it already accounts for this (thanks to a previous suggestion by Roedy), but the editor's live spelling feature is not "smart" enough to put together the word pieces, so it puts the squiggly red underlines under each different piece of a single word, thinking they are separate words.

Roedy - I've posted a message about this on the support group for the spell checker component that we use. I don't think this will be addressed for the release, but it should now be on the component developer's "radar".

Re: spell check comments

PostPosted: Mon Oct 31, 2011 7:05 pm
by roedygr
Even if the spell checker had no ability to CORRECT words with embedded tags or entities, it would incredibly wonderful if it could DETECT the errors, put squiggly lines under them and let me hit a key to jump to the next squiggly line to correct the problem manually. That could be much easier to do since spell engine need not be modified, just strip tags, and convert entities to Unicode before passing a string to it. See DeEntifyStrings.deEntify and DeEntifyStrings.stripTags for the Java methods to do that. See http://mindprod.com/products1.html#ENTITIES