Skip to content

Commit

Permalink
fix fanyi alice
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 20, 2013
1 parent 9b997fd commit 033428b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions lib/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ exports.iciba = function(data) {

// word
firstLine += data.key + ' ';

// maybe string
if (typeof data.ps === 'string') {
data.ps = [data.ps];
}
if (typeof data.pos === 'string') {
data.pos = [data.pos];
}
if (typeof data.acceptation === 'string') {
data.acceptation = [data.acceptation];
}


// phonetic symbol
if (data.ps && data.ps.length) {
Expand All @@ -16,11 +28,7 @@ exports.iciba = function(data) {

log(firstLine + ' ~ iciba.com'.faint);

// maybe string
if (typeof data.pos === 'string') {
data.pos = [data.pos];
data.acceptation = [data.acceptation];
}

// pos & acceptation
if (data.pos && data.pos.length) {
log();
Expand Down

0 comments on commit 033428b

Please sign in to comment.