mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Start test suite
This commit is contained in:
parent
5024dc92af
commit
70348e1934
6 changed files with 2705 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
|||
const constants = require("../constants")
|
||||
const {Parser} = require("./parser/parser")
|
||||
|
||||
function tryMatch(text, against, callback) {
|
||||
let matched = text.match(against)
|
||||
|
|
@ -28,6 +27,7 @@ function partsUsername(parts) {
|
|||
})
|
||||
}
|
||||
}
|
||||
return parts
|
||||
}
|
||||
|
||||
function partsHashtag(parts) {
|
||||
|
|
@ -41,6 +41,7 @@ function partsHashtag(parts) {
|
|||
})
|
||||
}
|
||||
}
|
||||
return parts
|
||||
}
|
||||
|
||||
function structure(text) {
|
||||
|
|
@ -51,3 +52,5 @@ function structure(text) {
|
|||
}
|
||||
|
||||
module.exports.structure = structure
|
||||
module.exports.partsUsername = partsUsername
|
||||
module.exports.partsHashtag = partsHashtag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue