Merge pull request #18 from Brecert/simple-markdown

- fix
This commit is contained in:
Supertiger 2019-11-14 14:26:29 +00:00 committed by GitHub
commit 15a7d4733d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -4,7 +4,7 @@ import config from "@/config.js";
export default (order) => { return {
order: order++,
match: function(source) {
return /^<:([\w\d_]+):([\w\d_]+)>/.exec(source)
return /^<:([\w\d_-]+):([\w\d_-]+)>/.exec(source)
},
parse: function(capture, parse, state) {

View file

@ -8,7 +8,11 @@ export default (order) => { return {
match: function(source) {
const match = linkify.match(source)
if(match === null) {
if(
match === null ||
match[0].index !== 0 ||
match.length === 0
) {
return null
}