~ubuntu-branches/ubuntu/utopic/anki/utopic

« back to all changes in this revision

Viewing changes to aqt/reviewer.py

  • Committer: Package Import Robot
  • Author(s): Andreas Bombe
  • Date: 2014-05-11 17:13:36 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140511171336-2vxrcfclmfjedas2
Tags: 2.0.26+dfsg-1
ImportedĀ UpstreamĀ versionĀ 2.0.26+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
        typeans.focus();
135
135
    }
136
136
    if (answerMode) {
137
 
        window.location = "#answer";
 
137
        var e = $("#answer");
 
138
        if (e[0]) { e[0].scrollIntoView(); }
138
139
    } else {
139
140
        window.scrollTo(0, 0);
140
141
    }
433
434
                return txt.split("::")[0]
434
435
            return txt
435
436
        matches = [noHint(txt) for txt in matches]
436
 
        if len(matches) > 1:
 
437
        uniqMatches = set(matches)
 
438
        if len(uniqMatches) == 1:
 
439
            txt = matches[0]
 
440
        else:
437
441
            txt = ", ".join(matches)
438
 
        else:
439
 
            txt = matches[0]
440
442
        return txt
441
443
 
442
444
    def tokenizeComparison(self, given, correct):