Made mentionWithDots available as a prop

This commit is contained in:
2021-11-19 01:26:37 +03:00
parent 6a840c3171
commit f2269798e6
15 changed files with 17173 additions and 45 deletions

View File

@@ -1092,7 +1092,7 @@ const endMentionMatch = _regexSupplant(/^(?:#{atSigns}|[#{latinAccentChars}]|:\/
const validMention = _regexSupplant(
'(#{validMentionPrecedingChars})' + // $1: Preceding character
'(#{atSigns})' + // $2: At mark
'([a-zA-Z0-9_]{1,20})', // $3: Screen name
'([a-zA-Z0-9_\.]{1,20})', // $3: Screen name
// '(/[a-zA-Z][a-zA-Z0-9_-]{0,24})?', // $4: List (optional)
{ validMentionPrecedingChars, atSigns },
'g'
@@ -1684,6 +1684,10 @@ function src_autoLink (text, options) {
type: Boolean,
default: true
},
mentionsWithDots: {
type: Boolean,
default: false
},
caretColor: {
type: String,
default: '#ccc'
@@ -1706,7 +1710,8 @@ function src_autoLink (text, options) {
},
computedBody () {
return highlight(this.body, {
extractUrlsWithoutProtocol: this.extractUrlsWithoutProtocol
extractUrlsWithoutProtocol: this.extractUrlsWithoutProtocol,
mentionsWithDots: this.mentionsWithDots
})
}
},