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

Syntax breaking #357

Closed
waderyan opened this issue Nov 17, 2016 · 2 comments
Closed

Syntax breaking #357

waderyan opened this issue Nov 17, 2016 · 2 comments
Assignees
Labels

Comments

@waderyan
Copy link

From @Pszek on November 15, 2016 11:34

  • VSCode Version: 1.7.1
  • OS Version: 10.11.6 (El Capitan)

After ternary operators ES6 string templates tend to break syntax highlighting (like the one below):
zrzut ekranu 2016-11-15 o 12 31 47

Copied from original issue: microsoft/vscode#15508

@sheetalkamat
Copy link
Member

@Pszek can you please paste your code here for investigation. Thanks

@ghost
Copy link

ghost commented Nov 18, 2016

Here you are:

const ProductPrice = ({inStock, price}) => {
  const dashCode = 8211
  const dash = String.fromCharCode(dashCode)
  return (
    <span
      className={styles.uPrice}
      itemProp='offers'
      itemScope=''
      itemType='https://schema.org/Offer'
    >
      <span
        itemProp='price'
      >
        {inStock
          ? I18n.toCurrency(price)
          : <div className={styles.outOfStock}>
            {`${dash}`}{I18n.t('spree.out_of_stock')}{`${dash}`}
            </div>}
      </span>
    </span>
  )
}

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

No branches or pull requests

2 participants