fix(nested-styling): reopen closed style

This commit is contained in:
Ahad Birang 2019-03-21 15:42:16 +03:30
parent 7b9211be50
commit 264f71b926

View file

@ -162,7 +162,7 @@ const applyStyle = (self, ...arguments_) => {
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
string = code.open + string.replace(code.closeRe, code.open) + code.close;
string = code.open + string.replace(code.closeRe, code.close + code.open) + code.close;
// Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS