Closed augusttty closed 2 months ago
I double-checked - the system helpers can be overriden. I created this file with overrides for two system helpers:
const overrides = {
inlineLinks: function () {
return 'some link text'
},
orphans: function () {
return 'whatever'
}
}
module.exports = overrides
I then ran dmd with the path to my custom helpers.
const output = await dmd(fixture, { helper: 'test/overrides/helpers.js' })
console.log(output)
The output looked as expected:
## Functions
<dl>
<dt><a href="#customFunction">customFunction()</a></dt>
<dd><p>some link text</p>
</dd>
<dt><a href="#firesError">firesError()</a></dt>
<dd><p>some link text</p>
</dd>
<dt><a href="#firesMany">firesMany()</a></dt>
<dd><p>some link text</p>
</dd>
<dt><a href="#firesDefinedEvent">firesDefinedEvent()</a></dt>
<dd><p>some link text</p>
</dd>
etc
etc
I override the default "link" helper by creating a plugin. But it didn't work.
It should have worked - could you post some example code please that fails to work correct, I will check it.
Closing this, I can't reproduce the issue - existing system helpers and partials can be overriden by passing in options.helper
, options.partial
or a plugin.. If you still have issues, please post some code I can run to reproduce and debug the issue.
I need to override system helpers, I override the default "link" helper by creating a plugin. But it didn't work.