mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: filter support plain link (#1657)
* fix: unexpected empty lines when copying-pasting * add ref * feat: support to filter plain link * eslint * fix the typo * fix the typo * unified the import path
This commit is contained in:
@ -8,6 +8,7 @@ import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts";
|
||||
import { checkShouldShowMemoWithFilters } from "@/helpers/filter";
|
||||
import Memo from "./Memo";
|
||||
import "@/less/memo-list.less";
|
||||
import { PLAIN_LINK_REG } from "@/labs/marked/parser";
|
||||
import copy from "copy-to-clipboard";
|
||||
|
||||
const MemoList = () => {
|
||||
@ -62,7 +63,7 @@ const MemoList = () => {
|
||||
if (memoType) {
|
||||
if (memoType === "NOT_TAGGED" && memo.content.match(TAG_REG) !== null) {
|
||||
shouldShow = false;
|
||||
} else if (memoType === "LINKED" && memo.content.match(LINK_REG) === null) {
|
||||
} else if (memoType === "LINKED" && (memo.content.match(LINK_REG) === null || memo.content.match(PLAIN_LINK_REG) === null)) {
|
||||
shouldShow = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user