mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 16:12:37 +00:00
9519a0b4e4b6b4ecb06bb1fa45017112a8b95ec3
When adding the Class Feature snippet, all curent text in the document is inserted in place of the randomly generated class name, creating several duplicates of the document and generally creating a mess. See #413 which was closed but the issue was never fixed. Most of the snippet code generators do not have any input arguments in the `module.exports` function, so they don't have this issue. However, Table of Contents needs to parse the text in the brew, so it is passed a copy of the brew document. Unfortunately, Class Feature (classfeature.gen.js) also has an input parameter for when it is used as part of the Full Class snippet. Thus, the unintended consequence occurs in snippetbar.jsx in the `execute` function. This fix simply adds a check to the execute function and only passes in the brew as an argument if the clicked snipped actually is the Table of Contents. Some restructuring might later reveal a cleaner way to do this rather than an awkward special case check like this.
The Homebrewery
The Homebrewery is a tool for making authentic looking D&D content using only Markdown. Check it out here.
issues, suggestions, bugs
If you run into any issues using The Homebrewery, please submit an issue here
local dev
Homebrewery is open source, so feel free to clone it, tinker with it, or run your own local version.
pre-reqs
getting started
- clone it
npm installnpm buildnpm start
standalone PHB stylesheet
If you just want the stylesheet that is generated to make pages look like they are from the Player's Handbook, you will find it here
If you are developing locally and would like to generate your own, follow the above steps and then run npm run phb.
changelog
You can check out the changelog here
license
This project is licensed under MIT
Description
Languages
JavaScript
71.1%
Less
27.7%
Shell
0.6%
CSS
0.4%
PowerShell
0.2%