Comments (7)
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.
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.
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.
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 link
makes 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.
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.
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.
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)
- Only works on Python 2.7+ HOT 1
- Formatting on links within parentheses HOT 1
- RegEx Suggestion HOT 1
- Adjacent square brackets inside code are mistakenly matched as links HOT 4
- Colon following link results in data loss
- Feature Request: Implement the very same functionality for footnotes
- links with internal line breaks not processed HOT 1
- Text is truncated when reference-style links are not all at bottom of document HOT 2
- formd as a module HOT 10
- Markdown-links starting at start of line truncate following text HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formd.