Code Monkey home page Code Monkey logo

Comments (7)

seth-brown avatar seth-brown commented on August 17, 2024

Thanks for the detailed description and sample MMD documents. I've update formd to, I think, correct the bug you're describing. Both inline and reference documents seem to be the same? Let me know if there are still problems after the patch. Thanks!

from formd.

kopischke avatar kopischke commented on August 17, 2024

Whoa, that was fast. I just tested the newly committed changes, and it’s almost there: footnotes are preserved (yay!), but the paragraph break before the first footnote is AWOL after flipping (which effectively kills it as a footnote, as footnotes need to be separate paragraphs). PS: The only difference between the two documents is the link in the body text (inline / reference) – the link in the footnote is inlined in both. Not a big difference, I’ll admit, but I thought that sufficient as a baseline test case :).

from formd.

seth-brown avatar seth-brown commented on August 17, 2024

Ok, thanks for the update. Curiously, I do not see this error. I'm in the middle of moving across the country, so I'll try and look into this over the next few days. Sorry for the troubles.

from formd.

kopischke avatar kopischke commented on August 17, 2024

I think I found the cause: the multiline URL line break removing code in _link is stripping the line breaks (commenting it out and yielding linkmakes the error go away), because the links RE will match a string from a final footnote number to the beginning of the first footnote, thus erroneously identifying it as a multiline link. I’ve submitted a pull request correcting the RE which seems to solve this in my testing.

from formd.

derdennis avatar derdennis commented on August 17, 2024

I want to thank both of you for the work you put in to make formd compatible with MultiMarkdown footnotes.

I still have trouble. All my footnotes disappear, when I use formd to convert my text.

Allow me to show an example:

This is before formd -r is run (Usually in vim, but I have the exact same problem when using formd on the commandline...):

Hello, this is a link to [Google](http://google.com).

This is some text with a footnote[^fn1].

Some other text with another footnote[^fn2].

And here is a link to [formd](https://github.com/drbunsen/formd).

[^fn1]: Such a nice footnote

[^fn2]: I love me some footnotes

And this is it after the run:

Hello, this is a link to [Google][1].

This is some text with a footnote[^fn1].

Some other text with another footnote[^fn2].

And here is a link to [formd][2].


[1]: http://google.com
[2]: https://github.com/drbunsen/formd

Links converted as requested, inline footnote markers still present, footnote content at the end of the file missing.

So, do you have any idea, what could be causing this trouble? I tried omitting the fn and just use numbers but it didn't help...

Is this reproducable with your setup? Could you have a look at this? Please let me know if you need additional information.

Thank you again for your great work and your time.

from formd.

seth-brown avatar seth-brown commented on August 17, 2024

My fault. I shuffled a few things around and clobbered the previous code that handled MMD footnotes. Footnotes should now be handled correctly. Please let me know if you have further trouble.

from formd.

derdennis avatar derdennis commented on August 17, 2024

Works beautiful!

Never mind the clobbering. Happens to me all the time. Now that it's fixed, I'm a very happy camper.

Thank you again.

from formd.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.