mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Implement @Lookup enricher (#1196)
This commit is contained in:
parent
952779000d
commit
86eeba0648
6 changed files with 50 additions and 68 deletions
8
module/enrichers/LookupEnricher.mjs
Normal file
8
module/enrichers/LookupEnricher.mjs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { parseInlineParams } from './parser.mjs';
|
||||
|
||||
export default function DhLookupEnricher(match, { rollData }) {
|
||||
const results = parseInlineParams(match[1], { first: 'formula'});
|
||||
const element = document.createElement('span');
|
||||
element.textContent = Roll.replaceFormulaData(String(results.formula), rollData);
|
||||
return element;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue