Skip to content

New version #18

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

Merged
merged 3 commits into from
Nov 28, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into new-version
  • Loading branch information
jacobp100 committed Nov 28, 2016
commit b2a3d04a5479a5169b96d3ab5f5b85c34ec52fc3
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const transformRawValue = input => (
export const parseProp = (propName, value) =>
new nearley.Parser(grammar.ParserRules, propName).feed(value).results[0];

export const getStylesForProperty = (propName, inputValue) => {
export const getStylesForProperty = (propName, inputValue, allowShorthand) => {
const value = inputValue.trim();

const propValue = (transforms.indexOf(propName) !== -1)
const propValue = (allowShorthand && transforms.indexOf(propName) !== -1)
? parseProp(propName, value)
: transformRawValue(value);

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.