Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Fix 絵文字の抽出処理のミスを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mohno007 committed Apr 18, 2019
1 parent d2f9e7a commit 3024ad3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typetalk-emoreact",
"version": "0.1.11",
"version": "0.1.12",
"description": "",
"scripts": {
"build": "rollup --config",
Expand Down
5 changes: 4 additions & 1 deletion src/view2model.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ const buildLike = likeNode => {
// いったん名前に" by "が含まれている場合を考慮しない
const match = tooltip.match(/(.*) by (.*)/);

console.log(match);

// マッチしない場合は名前のみで、コメントがないものとみなす
if (match === null) {
const username = tooltip;
const user = new User(username);
return Like.noComment(user);
}

const [comment, username] = match;
const comment = match[1];
const username = match[2];
const user = new User(username);

return Like.withComment(user, comment);
Expand Down

0 comments on commit 3024ad3

Please sign in to comment.