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
Properly handling <br> tags #79
Conversation
@daladim thank you so much for your PR! 😄 I will update the doc. This is what I propose: Before I can accept your PR, I need at least one automated test. Please, get the latest changes from master and implement an e2e test in the run-tests.sh. Get inspired from the existing tests. I propose this testing strategy:
That is it! Hope it help! 😄 |
I have added e2e tests.
Also, it looks like other test files (such as |
Indeed,
As they suggest, I will file a report to Inkscape (unless you tell me there is a good reason not to ?) |
@daladim : Could you suggest another (preferably dockerized) way of converting SVGs to PNGs? I would also suggest to implement only one test for your feature, that uses the following file: graph-with-br.mmd. More Thanks a lot for your help! 😄 |
I found the Nu Html Checker (v.Nu) They provide a Docker image, but it only exposes a web server that validates files, without a CLI invocation possible. |
I will get back to you. I am bit busy at the moment 😄 |
@daladim Please, merge in master. Then in your test create .svg file. The .svg file should be created in the same location as .mmd in |
3b8fee7
to
d6592d6
Compare
Thanks for your message. I'm still not able to really test locally, so I have split the test and its fix, to check I actually fixed something :-) |
c2d4aba
to
f2393a0
Compare
Hmm... It looks like the I have not pushed the fix commit yet, since there will be no way to check it actually fixes something |
3d33b21
to
a6e39f5
Compare
@daladim : I am sorry for all confussion. Let's try to figure out things together. The package contains images built from your PR. As far as I understand your PR, the purpose of it is that both outputs look like the one in png format. Having said that, thanks a lot for looking into this issue 😄 |
@@ -42,6 +42,8 @@ jobs: | |||
- name: Convert all svg files to png before uploading for automatic inspection | |||
run: | | |||
npm install convert-svg-to-png | |||
# convert-svg-to-png tries to create files by changing their extension, which could clash with already-existing PNG files | |||
for png_file in "${{env.INPUT_DATA}}"/*.png; do echo "Moving $png_file..."; mv "$png_file" "$png_file.bak"; done |
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, remove this line.
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.
Done; This means graph-with-br.mmd.png
that was created by run-tests.sh
will be overwritten by the one created in this step, is that all right?
(I couldn't find what "automatic inspection" the percy step is performing, so I'm not exactly sure which PNG files I am supposed to upload to it :-S )
That is strange, I don't have the same rendering :-) But you're right, the goal of all this is to have this rendering in all software: I have pushed a review commit to resolve your remarks. Please tell me whether they'e OK. Thanks! |
127c3e3
to
647cf62
Compare
Hmmm... Now I'd need your help :D |
@daladim : thanks a lot! I will get back to you (I am a bit busy at the moment). |
Hi @MindaugasLaganeckas , do you have any suggestions for this MR ? :-) |
Any update on this? I have to use sed to fix up the |
@daladim : please, integrate with master. I will have a look. Thanks for your help so far! :) |
I've just rebased on master. Thanks for your feedback! |
@daladim : I still get the same problem as before in Firefox on Windows 10: |
There is actually an error in the artifacts you gave the link of, I have the same error as yours. That's strange though, because that was the whole point of this MR. I don't know how to test it anymore. I tried a
So, I could not test whether something broke since last December :-( Did you check before merging? Do you want me to test something? |
See issue #74
<br>
tags are valid HTML, but SVG requires valid XML (where<br>
is written<br/>
)I'm sorry, but I'm new to node and I haven't been able to test this commit :-(
(after
yarn
andsource copy_modules.sh
, the doc instructs me to runnode index.bundle.js -i test/state1.mmd
but there is noindex.bundle.js
, I have no idea whether it is actually missing or whether I have failed to generate it).A test case is described in the linked issue in case you want to test it yourself (but I'd be happy someone tells me what I am missing to test this)