-
Notifications
You must be signed in to change notification settings - Fork 523
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
Package - Images in description aren't being displayed at all #337
Comments
Same issue for code snippets, like in Code Server... @vedderb haven't you noticed that yet in your own packages? |
Can you try with the latest beta? The markdown-support in Qt is not that good and in the latest beta I'm trying to manually parse it and generate html from it instead. It should work better for code blocks, but I'm not sure if https-images work for all platforms. Http should work. |
Saw your commit, great that there is such a library as maddy! For code-blocks, yes they are working now :) |
I can have a look at that. Regarding maddy, I rewrote six of the parsers, but that is not visible in the commit unfortunately. The image parser has image caching support now: I also spent a lot of work on the codeblock parser and I rewrote four others as they were super slow For QMarkdownEdit I fixed one bug that made it crash during some of the edit operations and I added support for changing the colors of everything depending on the vesc tool theme. |
Resizing is not working yet. It tried to use HTML |
This is what you can get working in the Qt editors: |
I tested the list now, it works for me. Do you have a way to reproduce the problem? |
The issue was on my side, therefor I deleted it. The line before |
That happens because I broke compatibility a bit with old packages by storing the raw data as markdown instead of html. I will add some code to detect if it is an old package and load the text as html instead. Regarding images, I think I can embed them in the packages so that they are stored locally. It is a bit tricky to make that work so that github also renders the images correctly, but I think it can be done with some clever caching. |
This fix should allow opening old packages properly: 1275db4 I have also added a markdown preview that is updated live next to the markdown editor: The beta is updated now. |
I tried your new editor with a I experience that the live-updates are very slow (1-2s), because it has an embedded image which is not beeing rendered, but shown as: I'm running Windows 10 21H2 and do compile using Qt Creator 11.0.3, Qt 5.15.2, MinGW 8.1.0 64-bit and CMake 3.24.2. I also tried to make a release with And the order of generated Markdown-symbols are a little bit mixed in page "Create Package": |
Conversion to markdown will not be perfect from old packages, it is mostly a help to transition from them to markdown. Base64 for the images (which was used before) will also not work that well with markdown. The load package page will work better in comparison as it does not try to convert it to markdown. |
According to the used function
QTextDocument::setMarkdown(..)
in vesc_tool/main.cpp, the completeMarkdownDialectGitHub
is supported, including images.However when compiling the description file, this formatting results in "not found images":
When generating the description and saving the package with VESC-Tool, it includes the images perfectly fine.
The text was updated successfully, but these errors were encountered: