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

Comments are in some cases highlighted incorrectly #67

Open
eggplantzzz opened this issue Feb 21, 2023 · 0 comments
Open

Comments are in some cases highlighted incorrectly #67

eggplantzzz opened this issue Feb 21, 2023 · 0 comments

Comments

@eggplantzzz
Copy link
Collaborator

eggplantzzz commented Feb 21, 2023

Consider the following two similar Solidity contracts:

contract MetaCoin {
  constructor() {
    balances[tx.origin/***stuff***/] = 10000;
  }
}

and

contract MetaCoin2 {
  constructor() {
    balances[tx.origin /***stuff***/] = 10000;
  }
}

In the first case, highlightjs-solidity seems to parse the / after tx.origin as division and the * as operators. In MetaCoin2, it will correctly parse the comment (when there is a space between tx.origin and /).

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

No branches or pull requests

1 participant