-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add syntax highlighting for code pastes and file extension support #34
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
Conversation
|
Hey @A91y , Awseome can you add line numbers to the response in web and also when we are using curl for the response on terminal it is giving HTML response, it should be plain text response.
|
Mr-Sunglasses
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer the to the previous comment for changes.
|
Right now, I am using pygments, I think it will be difficult to get proper curl output with that, so I'll try something different then. |
@A91y can we get the pasteview something like this? |
Yeah! I am trying to find a better option than pygments as it has that curl issue too, by that time I am updating |
|
@Mr-Sunglasses I am trying https://prismjs.com/ out. If successful, then it will work like a charm, but rendering just plain text while doing curl is still a mystery to me. Edit: |
|
@Mr-Sunglasses |
| @app.get("/paste/{uuid}") | ||
| async def get_paste_data(uuid): | ||
| path = f"data/{uuid}" | ||
| async def get_paste_data(uuid: str, user_agent: Optional[str] = Header(None)) -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of adding typing hits Any we can use Response as both PlainTextResponse and HTMLResponse inherits from class Response




Addressed in #6