1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Add parse and fetch pasted markdown titles with url

This commit is contained in:
Abner Soares Alves Junior
2019-02-28 14:57:52 -03:00
committed by Junyoung Choi
parent 5e134f990e
commit d81e69bf00
3 changed files with 43 additions and 9 deletions

View File

@@ -132,8 +132,13 @@ export function isObjectEqual (a, b) {
return true
}
export function isMarkdownTitleURL (str) {
return /(^#{1,6}\s)(?:\w+:|^)\/\/(?:[^\s\.]+\.\S{2}|localhost[\:?\d]*)/.test(str)
}
export default {
lastFindInArray,
escapeHtmlCharacters,
isObjectEqual
isObjectEqual,
isMarkdownTitleURL
}