Code blocks not printing properly
reynoldscem opened this issue ยท 16 comments
For some reason code blocks have stopped working for me and I can't for the life of me figure out why. Instead of a code block I now see a single opening chevron on it's own line (<).
Using mdv 1.7.4 with python 3.7 on ubuntu 16.04.5.
I tested multiple versions back - and the bug seems to be present in all of them. Maybe it's due a python change (pure speculation).
Funnily enough I installed from the repos head and the bug went away... I am not sure what is causing it to manifest at all. I guess I, and/or someone else should do some digging.
Funnily enough I installed from the repos head and the bug went away... I am not sure what is causing it to manifest at all. I guess I, and/or someone else should do some digging.
I can confirm the same for me.
It appears it was fixed in 80f333b. According to the tags I could see from git show-ref --tags
there hasn't been a release since release v1.6.3 e600ba6.
The history page on pypi disagrees and claims there have been releases up to September 19th of this year (version 1.7.4), but these are not tagged. Anyhow, as 80f333b is from October 30th it is not part of the current pypi release.
I guess the answer to resolve this then is to just push a new version.
I installed this from pip on Archlinux. Got the latest version, but I have the same problems. instead of code blocks, I see a <.
@gun1x Install it from git.
Can I do anything to help get a new package pushed? I'd love to use this for a project by my leads are saying that we've got to try something else because of this issue. Because of "reasons" I can't install it from git.
@reynoldscem How do I install it from git? I tried downloading master and copying over the contents of C:\cygwin64\lib\python3.6\site-packages\mdv
and now I don't see anything for code blocks at all.. just blank lines.
I solved this by running mdv with docker. Just add this to your .bashrc
or .zshrc
:
function mdv() {
docker run --rm -v $PWD:/sandbox -w /sandbox -it rawkode/mdv:latest $@
}
This works very well since the dependencies are in the container, and will also work on every distribution.
I installed docker and am using it with Cygwin. I created my mdvDocker script as below. Had to add winpty (vercel/hyper#2888)
#!/bin/bash
winpty docker run --rm -v $PWD:/sandbox -w /sandbox -it rawkode/mdv:latest $@
No matter what file path I give it, docker cannot find it..
$ mdvDocker.sh README.md
Traceback (most recent call last):
File "/usr/local/bin/mdv", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python2.7/site-packages/mdv/markdownviewer.py", line 1351, in run
print(str(run_args(args)))
File "/usr/local/lib/python2.7/site-packages/mdv/markdownviewer.py", line 1309, in run_args
tab_length = args.get('-b', 4))
File "/usr/local/lib/python2.7/site-packages/mdv/markdownviewer.py", line 997, in main
with open(filename) as f:
IOError: [Errno 2] No such file or directory: 'README.md'
Any way we get a release for that one? It is a deal breaker to me.
I would really love to see this working again too. Running on macOS, with the --head
version from homebrew, and I'm also facing this issue
This is still an issue. This is a very useful tool so it'd be great to see this updated on pypi.org
pip installing from the repo worked for me too. I agree that it would be great to get this on pypi.
Confirming that building from the repo fixes the issue.
pushed to pypi. sry.