Comments (10)
Soon, doing the release preps.
from shiki.
Awesome. This is perfect now. One more time: Thank you very much for this project!
from shiki.
You are right, it seems to be using color of light theme, not light plus.
from shiki.
That’s what I thought too. Why is this happening? How can I help investigate?
from shiki.
Another case. Note the {}
and the ;
on the output type:
Visual Studio Code
(Ignore the red squiggly.)
Shiki
Program Used to Produce Shiki Output
const shiki = require("shiki");
shiki
.getHighlighter({
theme: "light_plus",
})
.then((highlighter) => {
console.log(
highlighter.codeToHtml(
`function f(): { key: Type; otherKey: otherType } {}`,
"ts"
)
);
});
from shiki.
Upgrade to 0.1.7, which includes the updated Light+ theme.
from shiki.
Thank you.
I tried both cases I reported and only the second is fixed. The return
in return 'shiki';
still shows up in blue, not pink like I see in VS Code.
from shiki.
Probably, I need to update the grammar as well 😅
from shiki.
Seems fixed:
const shiki = require('shiki')
shiki.getHighlighter({
theme: 'light-plus'
}).then(highlighter => {
console.log(highlighter.codeToHtml(`return 'shiki';`, 'js'))
console.log(highlighter.codeToHtml(`function f(): { key: Type; otherKey: otherType } {}`, 'ts'))
})
from shiki.
I suppose you haven’t released the fixed version to npm yet, because my original example still shows return
in blue and your example above fails as the theme is called light_plus
, not light-plus
. When do you plan on releasing the fixed version?
from shiki.
Related Issues (20)
- shiki transformer this.addClassToHast is not a function in astro HOT 3
- The `transformerRenderWhitespace` option in `@shikijs/rehype` doesn't work
- shiki-renderer-svg support HOT 2
- Color replacement in multiple theme modes HOT 3
- `@shikijs/vitepress-twoslash`: Use twoslash in the case of using imported code snippets.
- Row of `language-*` on a single `code` element HOT 1
- Vue 当没有写 `template` 时无法正常高亮 HOT 1
- @shikijs/markdown-it: code block is wrong when entering a non-existent language HOT 2
- Twoslash node query blocks (^?) no longer display on separate lines since 0.x
- `remove-notation-escape`: notation escape syntax’s normalize transformer HOT 2
- Rehype: default language
- "TypeError: onigBinding.UTF8ToString is not a function" after some time / parallel requests in Next.js HOT 10
- Inconsistent behavior between `@shikijs/twoslash` and `@shikijs/vitepress-twoslash`
- Diff syntax highlighting doesn't work with css variables theme
- `light-dark()` CSS function for dual themes HOT 3
- how to use codeToHtml + transformer (meta) ? HOT 5
- Detect Notation Transformers dynamically
- Properly disposing of highlighters HOT 1
- Describe the bug here HOT 2
- `@shikijs/rehype`: support `langAlias` options
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 shiki.