mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 22:18:41 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user