Rename .value to .text or .color where applicable. (#1606)

* Update comment for defineFunction handler.

* Rename .value to .text in all token-style ParseNodes.

* Rename symbolNode's .value to .text.

* Rename color-token's .value to .color.
This commit is contained in:
Ashish Myles
2018-08-13 07:58:46 -04:00
committed by ylemkimon
parent 4e53f9d059
commit 8492a7532b
21 changed files with 146 additions and 151 deletions

View File

@@ -96,17 +96,17 @@ export const getVariant = function(
return "bold-italic";
}
let value = group.value;
if (utils.contains(["\\imath", "\\jmath"], value)) {
let text = group.text;
if (utils.contains(["\\imath", "\\jmath"], text)) {
return null;
}
if (symbols[mode][value] && symbols[mode][value].replace) {
value = symbols[mode][value].replace;
if (symbols[mode][text] && symbols[mode][text].replace) {
text = symbols[mode][text].replace;
}
const fontName = buildCommon.fontMap[font].fontName;
if (getCharacterMetrics(value, fontName, mode)) {
if (getCharacterMetrics(text, fontName, mode)) {
return buildCommon.fontMap[font].variant;
}