-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle webtiles spellset parsing a bit better
The webtiles code replaces the spellset in a monster description body with a placeholder. Previously it did this by regenerating the full spellset string and doing a simple `replace_all`. This obvious relies on deterministic behavior for `describe_spellset`, something not true of spells that have some random elemental coloring. This webtiles code could probably use some major refactoring, and possible the spellset should be separated out at the level of monster_info fields, but to fix this for release I've done something a bit simpler (and hackier). When generating a spellset description for webtiles, the monster description code inserts some delimiters, and these delimiters are used to insert the placeholder. I've also inserted some code to explicitly detect this sort of bug both when inserting the placeholder, and in the webtiles js code that was going wrong as a result of this bug. (For the latter, the colour string markers that remained in the body were getting parsed as tags by the browser, or maybe jquery, and wiping out the div where the real spellset was supposed to be inserted.)
- Loading branch information
Showing
3 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters