Update projecte regex to match on alphanumeric values with hyphens

This commit is contained in:
Manuel Bouza
2019-03-30 07:51:59 +01:00
parent d8398fca5f
commit 6dbadd14a2

View File

@@ -1,4 +1,4 @@
const projectRegex = /\[(\d+)\]/
const projectRegex = /\[([\w-]+)\]/
export default {
asana: {
@@ -22,7 +22,7 @@ export default {
const match = document
.querySelector(".ProjectPageHeader-projectName")
?.textContent?.trim()
?.match(/^\[(\w+)\]/)
?.match(projectRegex)
return match && match[1]
}
},