aaren / notedown

Markdown <=> IPython Notebook
BSD 2-Clause "Simplified" License
855 stars 115 forks source link

Fenced code blocks: Compatibility with pandoc #29

Closed nthiery closed 9 years ago

nthiery commented 9 years ago

When converting Rst to markdown, and writing a fenced code block, pandoc insert a space between the triple quotes and the options:

mistral-/tmp>cat bla.rst 
.. code:: python

    1+1

mistral-/tmp>pandoc bla.rst -t markdown
``` {.sourceCode .python}
1+1


However, when converting this further to a notebook, `notedown` seems
to get confused by this additional space, and does not produce a block
as desired.

Sorry, that later part is not super specific. I'll provide a complete
example later on, but right now I broke notedown on my machine while
hacking around ...

Would it be possible to tweak notedown's regexp to tolerate this
additional space?

Btw: thanks a lot for notedown! That's going to be super useful in my
Rst -> notebook workflow!
aaren commented 9 years ago

Should be a simple change to the regex. I'll fix next week. Thanks for reporting!

nthiery commented 9 years ago

On Thu, Sep 17, 2015 at 04:38:53AM -0700, aaren wrote:

Should be a simple change to the regex. I'll fix next week. Thanks for reporting!

Great, looking forward to it. Thanks in advance!

            Nicolas

Nicolas M. Thiéry "Isil" nthiery@users.sf.net http://Nicolas.Thiery.name/

aaren commented 9 years ago

I think that should have fixed your problem. Please say if not.

nthiery commented 9 years ago

Working beautifully! That's open source in action :-) Thanks much.