Skip to content

Comments are in some cases highlighted incorrectly #67

@eggplantzzz

Description

@eggplantzzz

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 /).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions