highlightjs / highlightjs/highlightjs-solidity

Comments are in some cases highlighted incorrectly

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
51
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.