Re: Smiley and footnotes Reply #15 – April 09, 2017, 11:09:18 am 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?
Re: Smiley and footnotes Reply #16 – April 09, 2017, 08:07:24 pm 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 , 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 – April 10, 2017, 04:33:49 am Quote from: emanuele – April 09, 2017, 11:09:18 amIf 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 – April 10, 2017, 07:13:15 am Quote from: Spuds – April 09, 2017, 08:07:24 pmIf 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 , 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] elseto:Code: [Select]a [1] elseand 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.
Re: Smiley and footnotes Reply #19 – April 10, 2017, 07:50:53 am 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 – April 10, 2017, 09:02:55 am 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 linkTesting superscript: a regular superscript link
Re: Smiley and footnotes Reply #21 – April 10, 2017, 09:32:14 am Humm links inside sub / sup are fighting the vertical alignment ... trying a css tweak now
Re: Smiley and footnotes Reply #22 – April 10, 2017, 01:19:02 pm Quote from: Frenzie – April 03, 2017, 11:30:27 amCode: [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! 1 Footnote↵2 Footnote↵3 Footnote↵
Re: Smiley and footnotes Reply #23 – April 10, 2017, 04:32:13 pm Looks good to me. How do we add a unit test to prevent regressions?
Re: Smiley and footnotes Reply #24 – April 10, 2017, 06:16:16 pm https://github.com/elkarte/Elkarte/pull/2904
Re: Smiley and footnotes Reply #25 – April 10, 2017, 10:26:31 pm Quote from: Frenzie – April 10, 2017, 04:32:13 pmLooks good to me.Agreed.