April 01

On Thursday, 1 April 2021 at 07:27:38 UTC, Vladimir Panteleev wrote:

>

Happy DDoc-ing!

Awesome!

April 01
On Thursday, 1 April 2021 at 17:52:38 UTC, Walter Bright wrote:
> On 4/1/2021 12:27 AM, Vladimir Panteleev wrote:
>> I am delighted to announce that as of today, you can use rich text formatting in forum.dlang.org messages.
>
> I am delighted that you've added this! Sweet!
>
> Inevitably, I have a suggestion. I've been opposed to adding Markdown support to Ddoc. But some has been added, and I was wrong. Ddoc needs to support Markdown.
>
> I recommend adding some Markdown to Dfeed. As to which flavor of Markdown, use the one we're familiar with - the Github flavor.

DFeed supports GH markdown - https://forum.dlang.org/help#markdown
April 01

Great improvements!

void main()
{
    writeln("thanks!");
}
April 01

On Thursday, 1 April 2021 at 07:27:38 UTC, Vladimir Panteleev wrote:

>

And if the above is not sufficient to express your intent, there is the nuclear option: $(SCRIPT ...), which allows embedding arbitrary JavaScript to format your post in however way you desire. jQuery is preloaded, so go nuts!

Easily the best one I've seen today! Well done.

April 01
On 4/1/21 12:42 PM, Walter Bright wrote:

> I'm concerned about running arbitrary scripts - what if bad people post
> malicious scripts that unsuspecting forum readers may run by reading the
> message? Could the Dfeed server be compromised by them?

Vladimir is implementing better checks against bad people. Malicious code will automatically be bounced back to the attacker. Stay tuned...

Ali

April 01
On 4/1/2021 12:59 PM, Arun wrote:
> DFeed supports GH markdown - https://forum.dlang.org/help#markdown

I didn't know that. Good!
April 01

On Thursday, 1 April 2021 at 20:22:04 UTC, surlymoor wrote:

>

On Thursday, 1 April 2021 at 07:27:38 UTC, Vladimir Panteleev wrote:

>

And if the above is not sufficient to express your intent, there is the nuclear option: $(SCRIPT ...), which allows embedding arbitrary JavaScript to format your post in however way you desire. jQuery is preloaded, so go nuts!

Easily the best one I've seen today! Well done.

Agreed!! 😆 👏👏👏

April 02
On Thursday, 1 April 2021 at 18:22:47 UTC, Ali Çehreli wrote:
> On the other hand, I am able to add headers other than Content-Type. So, perhaps Vladimir can support something like the following?
>
>   X-Markup: markdown

This method of advertising Markdown content was chosen because there is precedent for it:

https://www.google.com/search?q=%22Content-Type%22+%22markup%3Dmarkdown%22

As such, I think deviating from this convention would not be in line with maximizing interoperability.

I think the best way to add this to Thunderbird would be to write a small extension. Perhaps the extension could even provide a preview of the Markdown render, which would be useful to avoid accidentally mis-formatting the text, or even allow authoring messages in a WYSIWYG style (using one of the many available JavaScript/HTML Markdown WYSIWYG editors).

April 02
On Thursday, 1 April 2021 at 16:21:42 UTC, ag0aep6g wrote:
> On Thursday, 1 April 2021 at 07:27:38 UTC, Vladimir Panteleev wrote:
>> I am delighted to announce that as of today, you can use rich text formatting in forum.dlang.org messages.
>
> With Markdown enabled, the forum now eats HTML tags. If I enter "<foo>" and hit "save and preview", I see nothing.

I have added a lint rule which warns on thus omitted HTML code, and offers to fix it (by adding escaping backslashes).

> Worse, this also happens to quoted text. So if someone else wrote "<foo>" with Markdown disabled, and I reply to that message with Markdown enabled, the quote gets garbled. This also affects entities (e.g. "&#x1F608;").

Yes. This applies to all Markdown formatting in general. This is why Markdown formatting is disabled by default when replying to a post which was not in Markdown. If the author of the reply wishes to enable it, it is on them to ensure that the quoted parts of parent posts still make sense when rendered as Markdown.

It's not a problem that's unsolvable mechanically, but it would require that the "Enable Markdown" checkbox, in this circumstance, instead be presented as a button, which wraps quoted parts from the parent into code blocks, or other constructs which disable interpreting Markdown.

April 02
On 02.04.21 09:56, Vladimir Panteleev wrote:
> On Thursday, 1 April 2021 at 16:21:42 UTC, ag0aep6g wrote[...]
> I have added a lint rule which warns on thus omitted HTML code, and offers to fix it (by adding escaping backslashes).

Nice, but the warning doesn't show up for me. Probably not deployed yet?

Does the forum even support any HTML tags? If not, there's no point in stripping them. But maybe that's a limitation of the Markdown library you're using.

[...]
> Yes. This applies to all Markdown formatting in general. This is why Markdown formatting is disabled by default when replying to a post which was not in Markdown. If the author of the reply wishes to enable it, it is on them to ensure that the quoted parts of parent posts still make sense when rendered as Markdown.

As far as I'm aware, the newsgroup and mailing list interfaces are popular among forum regulars. If replying to them with Markdown is difficult, that's going to be annoying for the web users.

Luckily, the difference Markdown makes will be benign most of the time. It's not a big deal when "**emphasis**" or "`some code`" get interpreted as Markdown.
1 2 3 4 5 6 7