Skip to main content
Topic: Smiley and footnotes (Read 6076 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Smiley and footnotes

Reply #15

If I change the code to:
Code: [Select]
self::ATTR_TRIM => self::TRIM_NONE,
...
self::ATTR_BLOCK_LEVEL => false,
the examples by @Frenzie are working as expected.
Is there a particular reason why it is block level?
Bugs creator.
Features destroyer.
Template killer.

Re: Smiley and footnotes

Reply #16

If you want it to start on a a new line (div, p), should it not be block level?  I'm glad we have a fix :D, but it seems counter intuitive, or I've just had to much wine tonight!  Did you try it with just the self::TRIM_NONE?

Re: Smiley and footnotes

Reply #17

Quote from: emanuele – If I change the code to:
Code: [Select]
self::ATTR_TRIM => self::TRIM_NONE,
...
self::ATTR_BLOCK_LEVEL => false,
the examples by @Frenzie are working as expected.
Is there a particular reason why it is block level?
If you made that live on this site then it looks like you may have broken code-block escaping with that.

Edit: pastebin just to be safe although all should be clear when you quote/edit https://pastebin.com/66sU7B0x

Re: Smiley and footnotes

Reply #18

Quote from: Spuds – If you want it to start on a a new line (div, p), should it not be block level?  I'm glad we have a fix :D, but it seems counter intuitive, or I've just had to much wine tonight!  Did you try it with just the self::TRIM_NONE?
Yep, tried with only trim and doesn't change much.
But why do you need a new line after the footnote?
The bbcode converts:
Code: [Select]
a [footnote]something[/footnote] else
to:
Code: [Select]
a [1] else
and that "[1]" should not be a block-level. Or not?

@Frenzie yep, I noticed, I applied locally a possible fix, but I'm not entirely sure it doesn't break anything else, basically I strtr "[" and "]" inside any code block to the corresponding html entity so that the footnote code doesn't replace them with the html.
Bugs creator.
Features destroyer.
Template killer.

Re: Smiley and footnotes

Reply #19

TBH I'm not sure what the behavior should be after the [1] .... I don't think it should cause an automatic line break, in which case it should not be block level (the [1] that is, where as the notes themselves should each be on a new line)

Re: Smiley and footnotes

Reply #20

Footnotes are inline, but they shouldn't eat the next paragraph when they are at the very end of a line. They should behave exactly the same as a regular superscript link. Fake footnote follows.[1]

A new paragraph.

Edit:
Um, btw, that's:
Code: [Select]
[sup][url=http://duckduckgo.com][1][/url][/sup]

Testing subscript: a regular subscript link
Testing superscript: a regular superscript link

Re: Smiley and footnotes

Reply #21

Humm links inside sub / sup are fighting the vertical alignment ... trying a css tweak now

Re: Smiley and footnotes

Reply #22

Quote from: Frenzie –
Code: [Select]
Footnote directly at the end of line.[footnote]Footnote[/footnote]

Should be an empty line in between.

Footnote directly at the end of line.[1]

Should be an empty line in between.

Traditional workaround:
Code: [Select]
Footnote not directly at the end of line, but with an extra space at the end.[footnote]Footnote[/footnote] 

Should be an empty line in between.

Footnote not directly at the end of line, but with an extra space at the end.[2]

Should be an empty line in between.

Workaround for the sake of testing:
Code: [Select]
Footnote not directly at the end of line, but with an extra [i]thin[/i] space at the end.[footnote]Footnote[/footnote] 

Should be an empty line in between.

Footnote not directly at the end of line, but with an extra thin space at the end.[3]

Should be an empty line in between.

Edit: same problem in the OP btw.
Code: [Select]
A footnote[footnote]Something[/footnote]

A smiley after the footnote: :)

So basically the easy space workaround has been broken. NOOOOO! :P
Footnote
Footnote
Footnote
Bugs creator.
Features destroyer.
Template killer.

Re: Smiley and footnotes

Reply #23

Looks good to me. How do we add a unit test to prevent regressions?