Yanfly MessageCore WordWrap Spacing Issues

● ARCHIVED · READ-ONLY
Started by dragoonkain 1 posts View original ↗
  1. I've been encountering a lot of places where turning on WordWrap in YanFly MessageCore is resulting in words being glued together.

    http://imgur.com/eid4iBS

    I have been able to correct this issue with the following code.

    Window_Base.prototype.setWordWrap = function(text) { this._wordWrap = false; if (text.match(/<(?:WordWrap)>/i)) { this._wordWrap = true; text = text.replace(/<(?:WordWrap)>/gi, '\n'); } if (this._wordWrap) { text = text.replace(/^[\n\r]/, ''); text = text.replace(/(?!^) [\n\r]/g, ''); text = text.replace(/(?!^)[\n\r]+/g, ' '); // text = text.replace(/[\n\r]+/g, ''); text = text.replace(/<(?:BR|line break)>/gi, '\n'); } return text;};I was hoping someone out there might know what the issue is (if I can prevent it from happening) and/or if the fix could be consolidated to not needing 3 regexes.