Comments (2)
can you add more context for this @aldy505
from graphene.
So, we want an option to soft-wrap the text like this:
Notice how the wrapped text has no line number. In order to do that, we need to wrap them from the renderer because if you split the line and then highlight it using Shiki, 1) It will mess up the highlighting, 2) It will have a line number.
This would be super easy on plain HTML rendered on a browser, but we use SVG. Someone needs to figure out how to render multiline on SVG after the text has been highlighted. There are some things to consider:
- Shiki returns token, one will need to figure out how to split them after a certain amount of characters.
PORT
in that screenshot will count as 1 token but you need to split it into 2 without loosing its highlight. - If you render multiple lines, you must add an offset for the next line since the current line, which should take, let's say 20px, now is taking 40px because it got split into 2. The next line which should have 40px offset now needs to have 60px offset.
from graphene.
Related Issues (20)
- Crash after one request(?) HOT 1
- Make `<pre>` tag responsive HOT 3
- CSP error when clicking ▶ button
- Give visual cue to indicate that a request is ongoing
- Broken links on readme
- Frontend: make dropdowns respond to mouseup instead of mousedown HOT 3
- Bug: Error is returned when C# code is submitted HOT 1
- Frontend: Dismiss settings popup when we click outside the popup
- chore: bump esbuild-node-loader
- Frontend: Display error message properly instead of setting the returned json as image source HOT 2
- bug: font not correctly rendered HOT 1
- Default font on frontend to SF Mono? HOT 5
- treating tabs HOT 1
- Use `@teknologi-umum/eslint-config` for ESLint config
- update nodejs version on docker and nvmrc to newer lts
- figure out why the tests don't work with the latest esbuild-node-loader HOT 1
- fix CD HOT 3
- Double spaces on svg format
- API not working HOT 1
- feat: generate client side
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 graphene.