@kvass/rich-text 1.4.5 → 1.4.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvass/rich-text",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "rich text component for kvass",
5
5
  "main": "src/Component.vue",
6
6
  "scripts": {
package/src/Component.vue CHANGED
@@ -221,7 +221,7 @@ export default {
221
221
  case 'link':
222
222
  if (value)
223
223
  editor
224
- .setLink({ href: value, target: value.startsWith('/') ? '_self' : '_blank' })
224
+ .setLink({ href: value, target: value.startsWith(('/', '#')) ? '_self' : '_blank' })
225
225
  .run()
226
226
  else editor.unsetLink().run()
227
227
  break
@@ -231,7 +231,7 @@ export default {
231
231
  .setCta({
232
232
  href: value,
233
233
  'data-cta': this.bubbleOptions.theme,
234
- target: value.startsWith('/') ? '_self' : '_blank',
234
+ target: value.startsWith(('/', '#')) ? '_self' : '_blank',
235
235
  })
236
236
  .run()
237
237
  else editor.unsetCta().run()