facebookarchive/mention-bot

parseDiffFile stumbles when file name contains non-ascii

Closed this issue · 5 comments

diff --git adds quotes around the file name when its not pure

example:

[Error: Invalid line, should start with `diff --git a/`, instead got
diff --git "a/bengt-den-fula-fisken-f\303\266r-fulbyggen" "b/bengt-den-fula-fisken-f\303\266r-fulbyggen"
]
vjeux commented

Thanks for the report! Would you be interested in sending a pull request to fix it by any chance? :)

@vjeux If I fix it in a satisfactory manner I will definitely contribute the fix!

vjeux commented

Awesome thanks!

Is it just me or is the parseBlame not getting hits anymore? Did Github change structure of blame HTML?
https://github.com/facebook/mention-bot/blame/master/mention-bot.js

var re = /(<img alt="@([^"]+)" class="avatar blame-commit-avatar"|<td class="blame-commit-info")/g;

seems to work now