commit: 9bac4e7c6f7fea471b41be1cc42e8e461a881137
parent 42d5ddb64b35bfbcd9e8b122760e54ee3b22879c
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 28 Nov 2019 10:33:19 -0500
Added markup to bref
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js
@@ -29,12 +29,12 @@ function IngredientTemplate (id, rect) {
html += ingredient.BREF ? `<p class='bref'>${ingredient.BREF.to_markup()}</p>` : ''
html += ingredient.LONG ? `${new Runic(ingredient.LONG)}` : ''
- if(ingredient.PARENT){
+ if (ingredient.PARENT) {
const parent_ingr = all_ingredients[ingredient.PARENT.toUpperCase()]
- if(parent_ingr && parent_ingr.BREF){
- html += `<p>${parent_ingr.BREF}</p>`
+ if (parent_ingr && parent_ingr.BREF) {
+ html += `<p>${parent_ingr.BREF.to_markup()}</p>`
}
- if(parent_ingr && parent_ingr.LONG){
+ if (parent_ingr && parent_ingr.LONG) {
html += `${new Runic(parent_ingr.LONG)}`
}
}
@@ -44,7 +44,7 @@ function IngredientTemplate (id, rect) {
const parents = ingredient && ingredient.PARENT ? ingredient.PARENT.split(',') : []
const children = find_child_ingredients(name, all_ingredients)
const related = parents.concat(children)
- html += related.length > 0 ? `<h2>Related Ingredients</h2><ul class='ingredients'>${related.reduce((acc,ingr) => { return acc+print_ingredient(ingr) },'')}</ul>` : ''
+ html += related.length > 0 ? `<h2>Related Ingredients</h2><ul class='ingredients'>${related.reduce((acc, ingr) => { return acc + print_ingredient(ingr) }, '')}</ul>` : ''
return html
}
@@ -167,7 +167,7 @@ function IngredientTemplate (id, rect) {
return Object.keys(ingredients).length
}
- function print_ingredient(name){
+ function print_ingredient (name) {
return `
<li class='ingredient'>
<a onclick="Ø('query').bang('${name}')" href='#${name.to_url()}'>