gpoore / codebraid

Live code in Pandoc Markdown
BSD 3-Clause "New" or "Revised" License
367 stars 13 forks source link

Pandoc Version Read Incorrectly #39

Closed Lugarun closed 3 years ago

Lugarun commented 3 years ago

Pandoc version 2.10 is read as 2.1

$ codebraid pandoc --from markdown --to markdown notebook.md
Traceback (most recent call last):
  File "/home/removed/.local/bin/codebraid", line 8, in <module>
    sys.exit(main())
  File "/home/removed/.local/lib/python3.8/site-packages/codebraid/cmdline.py", line 62, in main
    args.func(args)
  File "/home/removed/.local/lib/python3.8/site-packages/codebraid/cmdline.py", line 80, in pandoc
    converter = converters.PandocConverter(paths=args.files,
  File "/home/removed/.local/lib/python3.8/site-packages/codebraid/converters/pandoc.py", line 569, in __init__
    raise RuntimeError('Pandoc at "{0}" is version {1}, but >= 2.4 is required'.format(pandoc_path, float(pandoc_version_match.group())))
RuntimeError: Pandoc at "pandoc" is version 2.1, but >= 2.4 is required
$ pandoc -v
pandoc 2.10.1
Compiled with pandoc-types 1.21, texmath 0.12.0.3, skylighting 0.8.5
Default user data directory: /home/removed/.local/share/pandoc or /home/removed/.pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
Lugarun commented 3 years ago

83ef46d82db01f2b142d9631ffe66f51d114f119 has addressed this problem. Just use the latest version of codebraid.