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

JSX/React doesn't work #105

Closed
VladimirMikulic opened this issue Dec 10, 2020 · 1 comment · Fixed by #108
Closed

JSX/React doesn't work #105

VladimirMikulic opened this issue Dec 10, 2020 · 1 comment · Fixed by #108

Comments

@VladimirMikulic
Copy link
Contributor

Hi @octref. Thank you for creating shiki.
While trying out the code example from the project's website (React snippet), I've noticed that shiki doesn't highlight JSX. Instead, it treats it like a plain text. You can find my code here.

Here is the output:

import * as React from 'react';
import './App.css';
import Hello from './components/Hello';

const logo = require('./logo.svg');

function App() {
  return (
    <div className="App">
      <div className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <h2>Welcome to React</h2>
      </div>
      <p className="App-intro">
        To get started, edit <code>src/App.tsx</code> and save to reload.
      </p>
      <Hello name="TypeScript" />
    </div>
  );
}

export default App;

Should be:

snippet

Thanks.

@VladimirMikulic
Copy link
Contributor Author

UPDATE: At the moment "jsx" mode doesn't work for React, use "javascript" instead until we get #108 merged.

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

Successfully merging a pull request may close this issue.

1 participant