mediacube-ui 0.1.365 → 0.1.366
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.366](https://github.com/MediaCubeCo/mcui/compare/v0.1.365...v0.1.366) (2025-03-18)
|
|
6
|
+
|
|
5
7
|
### [0.1.365](https://github.com/MediaCubeCo/mcui/compare/v0.1.364...v0.1.365) (2025-03-17)
|
|
6
8
|
|
|
7
9
|
### [0.1.364](https://github.com/MediaCubeCo/mcui/compare/v0.1.363...v0.1.364) (2025-03-10)
|
package/package.json
CHANGED
|
@@ -126,10 +126,9 @@ export default {
|
|
|
126
126
|
},
|
|
127
127
|
commentWithLinks() {
|
|
128
128
|
const regExp = /((http|https):\/\/)?(([0-9a-zA-Zа-яА-Я.-]*)\.([a-zA-Zа-яА-Я]+[^\s,.;:'"\])]+)(\/[^ ,.;\/\])]*)?)/gi
|
|
129
|
-
if (/\.(jpg|jpeg|png|svg|pdf|csv|webp|doc|docx)$/i.test(match)) {
|
|
130
|
-
return match
|
|
131
|
-
}
|
|
132
129
|
return this.comment.content.replace(regExp, match => {
|
|
130
|
+
// Проверяем, является ли match файлом
|
|
131
|
+
if (/\.(jpg|jpeg|png|svg|pdf|csv|webp|doc|docx)$/i.test(match)) return match
|
|
133
132
|
const url = /^http/.test(match) ? match : `http://${match}`
|
|
134
133
|
return `<a class="mc-chat-comment__link" href='${url}' target="_blank">${match.trim()}</a>`
|
|
135
134
|
})
|