Comments (2)
I am sending the code, turned into text and transferred to JSON, through a HTTP POST request. I don't understand why this does not result in a perfectly normal code preview.
from carbonara.
Hi! If you open carbon url with python code snippet you will see the same result (check it). Comment is not recognized. Then if you start typing you will see correctly highlighting is appeared. It's some tricky behavior of carbon and auto highlighting. You can open the issue in the corresponding repository.
Fortunately, there is a workaround for api: you should explicitly pass the language
option:
curl -L https://carbonara-42.herokuapp.com/api/cook \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"code": "# comment\nprint('\''Hello, world!'\'')",
"language": "python"
}' \
> code.png
from carbonara.
Related Issues (15)
- A server error has occurred FUNCTION_INVOCATION_FAILED while trying to POST on /api/cook HOT 2
- Specific Characters Inhibiting Bash Script from Generating Previews HOT 1
- Add support to Prettify code HOT 1
- it look like can not support Chinese HOT 5
- Website is Down!! HOT 2
- Image received has an ad on it HOT 5
- Is it possible to highlight parts of text? HOT 5
- error on POST request
- UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded HOT 2
- Heroku Endpoint is giving error response HOT 1
- Is this project dead? HOT 1
- Running image without SYS_ADMIN capability HOT 3
- Add transparent background support HOT 2
- WHat is the value of env carbon image selector HOT 1
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 carbonara.