This commit is contained in:
@@ -100,9 +100,9 @@ export default {
|
|||||||
if (items) {
|
if (items) {
|
||||||
let itemparts, icon, newspan
|
let itemparts, icon, newspan
|
||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
itemparts = RegExp(/<span[^>]*class="([^"]+)"[^>]*>.+<\/span>/g).exec(items[i], 'g')
|
itemparts = RegExp(/(<span[^>]*class="([^"]+)"[^>]*>)(.+)<\/span>/g).exec(items[i], 'g')
|
||||||
// console.log('itemparts', itemparts)
|
// console.log('itemparts', itemparts)
|
||||||
switch (itemparts[1]) {
|
switch (itemparts[2]) {
|
||||||
case 'placeName':
|
case 'placeName':
|
||||||
icon = '<span class="index-item-icon mdi mdi-map-marker"></span>'
|
icon = '<span class="index-item-icon mdi mdi-map-marker"></span>'
|
||||||
break
|
break
|
||||||
@@ -113,8 +113,12 @@ export default {
|
|||||||
icon = '<span class="index-item-icon mdi mdi-account"></span>'
|
icon = '<span class="index-item-icon mdi mdi-account"></span>'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
newspan = `<span class="no-wrap">${items[i]} ${icon}</span>`
|
|
||||||
// newspan = `${items[i]} ${icon}`
|
// newspan = `${items[i]} ${icon}`
|
||||||
|
// newspan = `<span class="no-wrap">${items[i]} ${icon}</span>`
|
||||||
|
// newspan = `${itemparts[1]}${itemparts[3]}${' '}${icon}</span>`
|
||||||
|
let words = itemparts[3].split(' ')
|
||||||
|
let lastword = words.splice(words.length - 1, 1)
|
||||||
|
newspan = `${itemparts[1]}${words.join(' ')} <span class="no-wrap">${lastword} ${icon}</span></span>`
|
||||||
this.teiparsed = this.teiparsed.replace(items[i], newspan)
|
this.teiparsed = this.teiparsed.replace(items[i], newspan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user