Skip to content

Commit

Permalink
修复正则表达式的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Jun 6, 2024
1 parent 23b1e51 commit 7d6107e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/FriendsMemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ let hh = ref(0)
const { height } = useElementSize(el)
const likeList = useStorage<Array<number>>('likeList', [])
const linkReg = /\[(.*)\]\((.*)\)/g
const linkReg = /\[(.*?)\]\((.*?)\)/g
const memoExt = computed(() => JSON.parse(props.memo.ext || '{}') as MemoExt)
const tags = computed(() => props.memo.content.match(/#(\S+)/g) || [])
const memoContent = computed(() => props.memo.content.replaceAll(/\n/g, '<br/>').replace(/#(\S+)/g, '').replaceAll(linkReg,"<a class='mx-0.5 text-primary/80' href='$2' target='_blank'>$1</a>"))
const memoContent = computed(() => props.memo.content.replaceAll(/\n/g, '<br/>').replace(/#(\S+)/g, '').replace(linkReg,"<a class='mx-0.5 text-primary/80' href='$2' target='_blank'>$1</a>"))
const imgs = computed(() => props.memo.imgs ? props.memo.imgs.split(',') : []);
const gridStyle = computed(() => {
Expand Down

0 comments on commit 7d6107e

Please sign in to comment.