Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes spaces in fractions causing invalid output (#435) #436

Merged
merged 4 commits into from
Feb 9, 2019
Merged

Fixes spaces in fractions causing invalid output (#435) #436

merged 4 commits into from
Feb 9, 2019

Conversation

Lucassifoni
Copy link
Contributor

What kind of change is this? (Bug Fix, Feature...)
Bug Fix of #435

Does this introduce any breaking changes?
No

Does the PR fulfill these requirements?

  • Tests for the changes have been added
  • Docs have been added or updated

Other Comments
Hi @peterramsing ,
I fixed the bug in #435 , that was actually present in every lost declaration which syntax allows fractions. I fixed it with the smallest possible code change, but maybe working on a proper parser would avoid this whole class of bugs... I'll try to draft a grammar of lost's syntax when I'll be less busy.

I added tests for this bug, but did not update the docs, since this edit is meant to allow input slightly different from ideal, but not wrong in its meaning either.

@codecov
Copy link

codecov bot commented Feb 2, 2019

Codecov Report

Merging #436 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #436   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          20     20           
  Lines         742    758   +16     
=====================================
+ Hits          742    758   +16
Impacted Files Coverage Δ
lib/lost-center.js 100% <100%> (ø) ⬆️
lib/lost-move.js 100% <100%> (ø) ⬆️
lib/lost-masonry-column.js 100% <100%> (ø) ⬆️
lib/lost-waffle.js 100% <100%> (ø) ⬆️
lib/_lu-utilities.js 100% <100%> (ø) ⬆️
lib/lost-column.js 100% <100%> (ø) ⬆️
lib/lost-row.js 100% <100%> (ø) ⬆️
lib/lost-offset.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78be8b8...b0978ca. Read the comment docs.

Copy link
Owner

@peterramsing peterramsing left a comment

Choose a reason for hiding this comment

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

Looks fantastic! Thanks!

* @param {string} str
* @returns {string}
*/
const glueFractionMembers = function glueFractionMembers(str) {
Copy link
Owner

Choose a reason for hiding this comment

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

Love the JSDoc! Thanks!

@@ -23,6 +23,16 @@ describe('lost-center', function() {
);
});

it('generates valid output given spaces are present in the input', function() {
check(
Copy link
Owner

Choose a reason for hiding this comment

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

🙌

@@ -3,6 +3,14 @@
var expect = require('chai').expect;
var utils = require('../lib/_lu-utilities.js');

describe('glueFractionMembers', () => {
Copy link
Owner

Choose a reason for hiding this comment

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

🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants