Refactor LaTeXML::Core::Box blessed objects#869
Merged
Conversation
Contributor
Author
|
oops, looks like one of the tests is suddenly failing on this (I remember them going through). I will have to have another look. |
Previously, objects representing a LaTeXML::Core::Box were an array, whereas objects representing LaTeXML::Core::Whatsit (which inherit from Box) were a hash. This led to duplication of several methods in the Whatsit class. This commit refactors LaTeXML::Core::Box (and other classes that inherit from it) to be a hash reference instead. This makes code between the two classes consistent with each other, and also makes code more readable overall due to named access of properties.
tkw1536
force-pushed
the
box-hash-refactor
branch
from
August 31, 2017 00:56
80152e0 to
ecbfd9c
Compare
Contributor
Author
|
Fixed, was caused by overlooking a special case in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, objects representing a
LaTeXML::Core::Boxwere an array, whereas objects representingLaTeXML::Core::Whatsit(which inherit from Box) were a hash. This led to duplication of several methods in the Whatsit class.This PR refactors
LaTeXML::Core::Box(andLaTeXML::Core::List,LaTeXML::Core::Comment,LaTeXML::Core::Whatsitthat inherit from it) to be a blessed hash reference instead. This makes code within between the four classes consistent with each other, and also makes code more readable due to named access of properties.