mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 07:26:50 +00:00
feat: enhance mailto/tel link handling and streamline imports
- Introduced isMailOrTelLink utility function to validate mailto/tel links. - Updated getPageProperties to properly handle mailto/tel links with target=_self, preventing unintended conversion to internal links by avoiding the addition of slashes. Closes #3485
This commit is contained in:
@@ -104,6 +104,15 @@ export function checkStartWithHttp(str) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否是邮件或电话链接
|
||||
* @param href
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isMailOrTelLink(href) {
|
||||
return /^(mailto:|tel:)/i.test(href)
|
||||
}
|
||||
|
||||
// 检查一个字符串是否UUID https://ihateregex.io/expr/uuid/
|
||||
export function checkStrIsUuid(str) {
|
||||
if (!str) {
|
||||
|
||||
Reference in New Issue
Block a user