Skip to content

Commit

Permalink
Added German apostroph
Browse files Browse the repository at this point in the history
For #4
  • Loading branch information
kkapsner committed Nov 29, 2020
1 parent d944606 commit 262f7be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compose/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ const quoteRules = function(){
return "\u201A";
}
const next = context.next;
if (next && previous && !previous.match(noWordEndRegExp) && !next.match(noWordStartRegExp)){
return "\u2019";
}
if (!next || next.match(noWordStartRegExp)){
if (previous && !previous.match(/\u201A[^\u2018]*$/)){
return "\u2019";
}
return "\u2018";
}
}
Expand Down

0 comments on commit 262f7be

Please sign in to comment.