Skip to content

Missing "await" and "async" keywords in jsx and JavaScript lexers #385

@jmooring

Description

@jmooring

The await and async keywords are missing from the JSX and JavaScript lexers.

Raw text:

class UserProvider extends React.Component {
  state = { user: null };

  async componentDidMount() {
    const user = await fetchUser();
    this.setState({ user });
  }

  render() {
    return this.props.render(this.state.user);
  }
}

As rendered by Chroma in Hugo with "monokai" style:

image

As rendered by GitHub:

image

I'll submit a PR later today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions