Match hex digits as a SHA-1 only at word boundaries
This was picking up "bedded" from within the English word "embedded" and marking it as a SHA-1. Use \b to match only individual words. Change-Id: If8b2afb9459fcd0ef58dec58a77362caf5da732f
This commit is contained in:
@@ -2,7 +2,7 @@ CodeMirror.defineMode('gerrit_commit', function() {
|
||||
var header = /^(Parent|Author|AuthorDate|Commit|CommitDate):/;
|
||||
var id = /^Change-Id: I[0-9a-f]{40}/;
|
||||
var footer = /^[A-Z][A-Za-z0-9-]+:/;
|
||||
var sha1 = /[0-9a-f]{6,40}/;
|
||||
var sha1 = /\b[0-9a-f]{6,40}/;
|
||||
|
||||
return {
|
||||
token: function(stream) {
|
||||
|
||||
Reference in New Issue
Block a user