Skip to content

Conversation

@FoggyFinder
Copy link
Collaborator

Close: #47

case MathAtomType.Fraction:
case MathAtomType.Ordinary:
// functions are treated as a LargeOperator so no special case here. Yet?
case MathAtomType.LargeOperator:
Copy link
Collaborator

@Happypig375 Happypig375 Dec 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LargeOperators have special handling for positioning of superscripts and subscripts. They always support them.

return false;
default:
return true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will a blacklist-based approach be better? It seems that adding a placeholder is the minority case and new cases for MathAtomType should support direct scripts by default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even black & white lists with default false?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, a switch expression should be used for exhaustiveness warnings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Played a bit with both approaches. Now I also see more advantages of having the single list. You're totally right.

@Happypig375 Happypig375 added the Resolution/Implemented The described enhancement or housekeeping work has been implemented. label Dec 11, 2019
@Happypig375 Happypig375 merged commit 3f4e8d3 into verybadcat:master Dec 11, 2019
@FoggyFinder FoggyFinder deleted the additionalPlaceholderWhenNeeded47 branch December 11, 2019 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Resolution/Implemented The described enhancement or housekeeping work has been implemented. Type/Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HandleExponent: Put a placeholder if current atom isn't a variable or a number

2 participants