Skip to content

Commit

Permalink
fix links
Browse files Browse the repository at this point in the history
close #953
  • Loading branch information
moo-man committed Dec 22, 2021
1 parent 23c0654 commit 0e261ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Warhammer Fantasy Roleplay 4th Ed. (FoundryVTT)

![](https://user-images.githubusercontent.com/28637157/97379891-e4a1cc00-1893-11eb-9e0c-d93b92844d5b.jpg)
**[Current Version]**: `5.0.1`
**[Current Version]**: `5.0.2`

**[Compatibility]**: `FoundryVTT V9`

Expand Down
6 changes: 3 additions & 3 deletions modules/system/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function () {
* @param {Object} rollData The data object providing context for inline rolls
* @return {string} The enriched HTML content
*/
TextEditor.enrichHTML = function (content, { secrets = false, entities = true, links = true, rolls = true, rollData = null } = {}) {
TextEditor.enrichHTML = function (content, { secrets = false, documents = true, links = true, rolls = true, rollData = null } = {}) {

// Create the HTML element
const html = document.createElement("div");
Expand All @@ -111,7 +111,7 @@ export default function () {
let text = [];

// Replace entity links
if (entities) {
if (documents) {
if (updateTextArray) text = this._getTextNodes(html);
const documentTypes = CONST.DOCUMENT_LINK_TYPES.concat("Compendium").concat(game.wfrp4e.config.PSEUDO_ENTITIES);
const rgx = new RegExp(`@(${documentTypes.join("|")})\\[([^\\]]+)\\](?:{([^}]+)})?`, 'g');
Expand Down Expand Up @@ -169,7 +169,7 @@ export default function () {
// Update link data
data.name = data.name || (broken ? target : document.name);
data.icon = config.sidebarIcon;
data.dataset = { document: type, id: broken ? null : document.id };
data.dataset = { type, id: broken ? null : document.id };
}

// Get a matched PlaylistSound
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wfrp4e",
"title": "Warhammer Fantasy Roleplay 4th Edition",
"description": "A comprehensive system for running grim and perilous games of Warhammer Fantasy Roleplay in the Foundry VTT environment.",
"version": "5.0.1",
"version": "5.0.2",
"author": "Moo Man, CatoThe1stElder",
"authors" : [
{
Expand Down Expand Up @@ -53,6 +53,6 @@
"templateVersion":3,
"socket": true,
"manifest" : "https://raw.githubusercontent.com/moo-man/WFRP4e-FoundryVTT/master/system.json",
"download" : "https://github.com/moo-man/WFRP4e-FoundryVTT/releases/download/5.0.1/wfrp4e.zip",
"download" : "https://github.com/moo-man/WFRP4e-FoundryVTT/releases/download/5.0.2/wfrp4e.zip",
"url" : "https://github.com/moo-man/WFRP4e-FoundryVTT"
}

0 comments on commit 0e261ba

Please sign in to comment.