afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-07-01 03:28 pm

[dw-free] missing break between misspelled word and suggested fixes

[commit: http://hg.dwscoalition.org/dw-free/rev/f28123226658]

http://bugs.dwscoalition.org/show_bug.cgi?id=1322

Add space between misspelled word and suggested fixes.

Patch by [staff profile] denise.

Files modified:
  • cgi-bin/LJ/SpellCheck.pm
--------------------------------------------------------------------------------
diff -r 3ed8be398cda -r f28123226658 cgi-bin/LJ/SpellCheck.pm
--- a/cgi-bin/LJ/SpellCheck.pm	Wed Jul 01 15:18:13 2009 +0000
+++ b/cgi-bin/LJ/SpellCheck.pm	Wed Jul 01 15:27:55 2009 +0000
@@ -97,10 +97,10 @@ sub check_html {
 		$ofs -= 1; # because ispell reports "1" for first character
 		
 		$output .= LJ::ehtml(substr($inline, $srcidx, $ofs-$srcidx));
-		$output .= "<font color=\"$self->{'color'}\">".LJ::ehtml($word)."</font>";
+		$output .= "<font color=\"$self->{'color'}\">" . LJ::ehtml($word)."</font>";
 		
-		$footnotes .= "<tr valign=top><td align=right><font color=$self->{'color'}>".LJ::ehtml($word).
-                              "</font></td><td>".LJ::ehtml($idata)."</td></tr>";
+		$footnotes .= "<tr valign=top><td align=right><font color=$self->{'color'}>" . LJ::ehtml($word).
+                              "&nbsp;</font></td><td>".LJ::ehtml($idata)."</td></tr>";
 		
 		$srcidx = $ofs + length($word);
 	    } elsif ($idata =~ /^\# /) {
@@ -109,7 +109,7 @@ sub check_html {
 		my ($word, $ofs) = ($1, $2);
 		$ofs -= 1; # because ispell reports "1" for first character
 		$output .= LJ::ehtml(substr($inline, $srcidx, $ofs-$srcidx));
-		$output .= "<font color=\"$self->{'color'}\">".LJ::ehtml($word)."</font>";
+		$output .= "&nbsp;<font color=\"$self->{'color'}\">".LJ::ehtml($word)."</font>&nbsp;";
 		$srcidx = $ofs + length($word);
 	    }
 	} while ($idata ne "");
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org