diff --git a/CHANGELOG.md b/CHANGELOG.md index d540eb4d..dd16c3c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ `1.901` * Features: * Added a sheet option to disable Force Pool on Rival and Nemesis actor sheets ([#1502](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1502)) + * The importer will no longer include every source as a header element, making it easier to read * Fixes: * Fixed a bug where item qualities sometimes showed "you do not have permission to view this item" for non-GMs ([#1552](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1552)) * Fixed changing skill characteristics not working ([#1550](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1550)) * Skill descriptions are now properly imported ([#1551](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1551)) * Talents from species no longer multiply ranks when combined with purchased talents ([#1540](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1540)) + * Fixed a bug where some text disappeared from descriptions ([#1559](/~https://github.com/StarWarsFoundryVTT/StarWarsFFG/issues/1559)) + * Fixed a bug where paragraph tags did not properly result in new lines `1.900` * Features: diff --git a/modules/helpers/journal.js b/modules/helpers/journal.js index c0fcdb75..d4adba69 100644 --- a/modules/helpers/journal.js +++ b/modules/helpers/journal.js @@ -323,13 +323,14 @@ export function register_oggdude_tag_enricher() { enricher: async (match, options) => { let element = document.createElement("span"); element.classList.add("bold"); + element.textContent = match[2]; return element; } }); CONFIG.TextEditor.enrichers.push({ - pattern: /(\[P\])(.[^\[]*)/gm, + pattern: /(\[P\](?![p]))/gm, enricher: async (match, options) => { - let element = document.createElement("p"); + let element = document.createElement("br"); return element; } }); @@ -345,6 +346,7 @@ export function register_oggdude_tag_enricher() { enricher: async (match, options) => { let element = document.createElement("span"); element.classList.add("italic"); + element.textContent = match[2]; return element; } }); @@ -352,6 +354,7 @@ export function register_oggdude_tag_enricher() { pattern: /(\[H1\])(.[^\[]*)\[h1\]/gm, enricher: async (match, options) => { let element = document.createElement("h1"); + element.textContent = match[2]; return element; } }); @@ -359,6 +362,7 @@ export function register_oggdude_tag_enricher() { pattern: /(\[H2\])(.[^\[]*)\[h2\]/gm, enricher: async (match, options) => { let element = document.createElement("h2"); + element.textContent = match[2]; return element; } }); @@ -373,7 +377,8 @@ export function register_oggdude_tag_enricher() { CONFIG.TextEditor.enrichers.push({ pattern: /(\[H4\])(.[^\[]*)\[h4\]/gim, enricher: async (match, options) => { - let element = document.createElement("h4"); + let element = document.createElement("h3"); // h4 doesn't exist + element.textContent = match[2]; return element; } }); diff --git a/modules/importer/import-helpers.js b/modules/importer/import-helpers.js index 27cebe01..2dd11c93 100644 --- a/modules/importer/import-helpers.js +++ b/modules/importer/import-helpers.js @@ -2223,9 +2223,9 @@ export default class ImportHelpers { const text = sourceArray.map((s) => { if (s?.$Page) { - return `

Page ${s.$Page} - ${s._}

`; + return `Page ${s.$Page} - ${s._}
`; } else { - return `

${s}

`; + return `${s}
`; } });