Skip to content

Conversation

georgthegreat
Copy link

Link is correctly appended to the bottommost element of the markup.

@mitya57
Copy link
Collaborator

mitya57 commented May 21, 2015

With the following source:

footnote[^1]

[^1]: some text

        code block

I get this HTML:

<p>footnote<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup></p>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>some text</p>
<pre><code>code block
&#160;
<a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></code></pre>
</li>
</ol>
</div>

A link inside a code block is wrong.

Actually, I think we should keep the current behaviour and not introduce hacks.

@georgthegreat
Copy link
Author

I've posted rationale in #410.
Styling backreference symbol in current markup is a pain.
Styling bakcreference after the change seems to be quite easy (single CSS rule to make it block element).

Though this leads to a breaking change in markup, I'm not sure if anyone (except for myself) used such complicated markups at all.

@georgthegreat
Copy link
Author

BTW, I don't see anything wrong with the markup from above.
Backref Is rendered on another line, which seems to be wrong.

Restore nbsp;
@waylan
Copy link
Member

waylan commented May 21, 2015

Absolutely not. A link does not go inside a code block. The only way to add a backref link when a footnote ends in a codeblock is to add a new paragraph. I will not consider any other alternative.

I'm not sure if anyone (except for myself) used such complicated markups at all.

I think that may be the case. In all the years I've been involved, I've never seen anyone make this complaint before. And most documents I read have simple footnotes that contain nothing more than a paragraph or two. As I stated in #410 I don't think a solution can be found which gives you what you want and accounts for all of the edge cases properly. Of course, if you prove me wrong, I will reconsider. However, this PR only proves me right so far.

That said, you are free to fork the extension and maintain your own which behaves in whatever way to want. Just be sure you do so within the limits of the license.

@georgthegreat
Copy link
Author

I will not consider forking as an alternative.
If you think that this PR isn't doing anything good, you may close it, I can live without it (arrows on a separate line are annoying, but not that annoying).

BTW, tests are continuing to fail, I know about the problem :)

@waylan waylan closed this May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants