0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 16:12:37 +00:00
Trevor Buckner 9519a0b4e4 Fix duplicated text from Class Feature snippet
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.
2018-05-11 10:20:18 +01:00
2018-04-09 00:12:56 -04:00
2016-11-23 23:00:28 -05:00
2018-04-09 00:12:56 -04:00
2018-04-09 00:12:56 -04:00
2018-04-09 00:12:56 -04:00
2018-04-09 00:12:56 -04:00
2018-04-09 00:12:56 -04:00
2018-04-09 00:12:56 -04:00
2016-12-25 21:44:27 -05:00
2018-05-10 13:11:40 -04:00
2018-05-07 10:56:23 +01:00

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

  1. install node
  2. install mongodb

getting started

  1. clone it
  2. npm install
  3. npm build
  4. npm 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
Create authentic looking D&D homebrews using only markdown
Readme 481 MiB
Languages
JavaScript 71.1%
Less 27.7%
Shell 0.6%
CSS 0.4%
PowerShell 0.2%