Skip to content

Commit

Permalink
use only one correct and one incorrect example, as discussed on the m…
Browse files Browse the repository at this point in the history
…ailing list; use the standard "x" character instead of a unicode char that doesn't exist on all systems
  • Loading branch information
danielnaber committed Dec 23, 2013
1 parent 7f19f43 commit fd1b944
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -796,13 +796,14 @@ public void hyperlinkUpdate(HyperlinkEvent e) {
private String getExampleSentences(Rule rule) {
StringBuilder examples = new StringBuilder();
List<IncorrectExample> incorrectExamples = rule.getIncorrectExamples();
for (IncorrectExample incorrectExample : incorrectExamples) {
String sentence = incorrectExample.getExample()
.replace("<marker>", "<span style='color:red'>").replace("</marker>", "</span>");
examples.append("<br/>").append(sentence).append("&nbsp;<span style='color:red'></span>");
if (incorrectExamples.size() > 0) {
String incorrectExample = incorrectExamples.iterator().next().getExample();
String sentence = incorrectExample.replace("<marker>", "<span style='color:red'>").replace("</marker>", "</span>");
examples.append("<br/>").append(sentence).append("&nbsp;<span style='color:red'>x</span>");
}
List<String> correctExamples = rule.getCorrectExamples();
for (String correctExample : correctExamples) {
if (correctExamples.size() > 0) {
String correctExample = correctExamples.iterator().next();
String sentence = correctExample.replace("<marker>", "<span style='color:green'>").replace("</marker>", "</span>");
examples.append("<br/>").append(sentence).append("&nbsp;<span style='color:green'>✓</span>");
}
Expand Down

0 comments on commit fd1b944

Please sign in to comment.