kakaroto / Beyond20

D&D Beyond Character Sheet Integration in Roll20
GNU General Public License v3.0
497 stars 145 forks source link

Postprocess action_name the same as description #1036

Closed kakaroto closed 1 year ago

kakaroto commented 1 year ago

The description is post processed to change   into spaces and other similar stuff https://github.com/kakaroto/Beyond20/blob/f98d15fe42a82be4bc559aead3dcd711bed9c7e0/src/dndbeyond/base/utils.js#L54-L63

But action_name isn't, so a monster looking for action will fail to match when it checks for description.startsWith(action_name) https://github.com/kakaroto/Beyond20/blob/f98d15fe42a82be4bc559aead3dcd711bed9c7e0/src/dndbeyond/base/monster.js#L650

kakaroto commented 1 year ago

yeahh, not actually necessary to do the same replaces, because using .text() already gives us the right html-decoded data. The problem seems to be that there's a special unicode character that looks like a space but is non-breaking. image So.. I'll need to replace that instead, or use that space character for the .replace( ) (but I don't think I should do that since it would cause other regexps parsing the dice formulas and stuff to potentially fail.