Comments (8)
This issue still occurs in version 0.0.8 published in npm.
from react-code-blocks.
Reading your code, I saw you're using Prism highlighter by default
// https://github.com/rajinwonderland/react-code-blocks/blob/master/packages/react-code-blocks/src/components/Code.tsx#L2
import React, { PureComponent } from 'react';
import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter';
import { applyTheme } from '../utils/themeBuilder';
And you normalized the bash to shell
// https://github.com/rajinwonderland/react-code-blocks/blob/master/packages/react-code-blocks/src/utils/normalizeLanguage.ts#L67-L70
{
name: 'Shell',
alias: ['shell', 'bash', 'sh', 'ksh', 'zsh'],
value: 'shell',
},
And then I checkout the react-syntax-highlighter
https://github.com/react-syntax-highlighter/react-syntax-highlighter/tree/master/src/languages/prism
It looks like Prism support bash instead of shell.
However, hljs supports both bash and shell.
from react-code-blocks.
@SebasG22 try using markup
instead of html
! Here's a previous issue for further clarification
@thesobercoder @lawrenceching I'll be hopefully free this weekend to push a new release! 🤞
Always accepting PRs too!
from react-code-blocks.
Great catch @lawrenceching I'll go ahead and fix this!
from react-code-blocks.
Is this fixed? I'm still getting the error.
from react-code-blocks.
I'm getting the same error but with html
.
Language html not supported
Hopefully, a fix should be on the way.
from react-code-blocks.
Hi @rajinwonderland, I tried this weekend to push a PR to you to fix it, but I was unable to fork the repo and make it worked on my laptop.
Are there any requirements or pre-build operations to do to make this project work locally ?
For example, I had some trouble with the command yarn workspace
command.
from react-code-blocks.
Hey @mat250 sorry for answering so late!
You want to:
Install Dependencies
yarn
Start Storybook
yarn pkg storybook
Build the Package
yarn pkg build
Watch the package
yarn pkg start
Preview on Demo
yarn start:demo
or
yarn demo start
Submit PR
🎉🎉🎉🎉
Let me know if this helps!
from react-code-blocks.
Related Issues (20)
- CopyBlock warnings HOT 4
- Property "text" does not exist in type HOT 8
- Atlaskit theme
- Cannot run on react 17 + typescript HOT 7
- Export supported languages as a type
- Bug in highlight for some cases of ranges of one-digit to double-digit
- CopyBlock: Errors in the Console because of copied/codeBlock HOT 2
- Npm page is not updated HOT 7
- The wrapLongLines function isn't formatting properly.
- Support for React 18 HOT 1
- Bug: line highlighting doesn't work without line numbers
- Edit Feature?
- Copy Buttons do not have an accessible name
- Support for CSS Language HOT 1
- Language xml not supported HOT 2
- Is it possible to make the links clickable HOT 1
- Uncaught runtime errors: Cannot read property 'useContext' of null HOT 1
- Update some packages used HOT 2
- Can no longer create custom themes HOT 5
- Issue upgrading to 0.1.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-code-blocks.