Jump to page: 1 27  
Page
Thread overview
April 01

(This post best viewed on forum.dlang.org!)

Greetings esteemed forum users,

I am delighted to announce that as of today, you can use rich text formatting in forum.dlang.org messages.

This should help make code samples more readable, format tabular information as actual tables, but also add subtle or strong emphasis to your posts and hopefully improve how we communicate with our fellow netizens.

I have deliberated for a bit on which markup syntax to use—but, all things considered, there is really only one answer. There already exists an elegant and well-established markup language that members of our community are well familiar with, which is what has been implemented today. I am, of course, talking about DDoc!

To get you started, here is a primer:

  • $(B bold text)bold text
  • $(I italic text)italic text
  • $(D inline code)inline code
  • $(LINK https://dlang.org/)https://dlang.org/
  • $(LINK2 https://dlang.org/, The Best Programming Language)The Best Programming Language
  • Need to escape a special character? $(DOLLAR), $(LPAREN) and $(RPAREN) are there and do exactly what they say.

Inline code blocks are easy:

---
import std.stdio;
void main() { writeln("Hello, world!"); }
---

becomes:

import std.stdio;
void main() { writeln("Hello, world!"); }

Tables are even easier:

$(TABLE $(TR $(TH Year) $(TH D users))
$(TR $(TD 2010) $(TD 10,000))
$(TR $(TD 2020) $(TD 100,000))
$(TR $(TD 2030) $(TD 1,000,000)))

becomes:

Year D users
2010 10,000
2020 100,000
2030 1,000,000

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!

If you are not using the forum.dlang.org web interface, no worries—messages will still come through to you in good old plain text. And, if you're not a fan, you are in control: you can disable DDoc formatting in the posting form, or completely disable DDoc rendering on the settings page.

Happy DDoc-ing!

— Vladimir

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!

Ermm... what?
April 01
On 4/1/21 12:27 AM, Vladimir Panteleev wrote:

> (This post best viewed on [forum.dlang.org](https://forum.dlang.org/)!)
>
> Greetings esteemed forum users,
>
> I am delighted to announce that as of today, you can use rich text
> formatting in forum.dlang.org messages.

Thank you! The March part of these features are impressive. ;) However, some parts of posts are unexpectedly rendered in large font:

  https://forum.dlang.org/post/1909.13835@ddili.org

Is that because I used double dashes at footers and the large font is for the signature of the sender?

Ali

April 01
Ah, got it, lol.
April 01

Sounds really good. Can it format Parrot code?

April 01
On Thursday, 1 April 2021 at 07:49:50 UTC, Ali Çehreli wrote:
> However, some parts of posts are unexpectedly rendered in large font:
>
>   https://forum.dlang.org/post/1909.13835@ddili.org
>
> Is that because I used double dashes at footers and the large font is for the signature of the sender?

Looks like the double dashes were being interpreted as underlining the previous line. Added a preprocessing rule to fix this, seems to look better now :)

April 01
On 4/1/21 1:08 AM, Vladimir Panteleev wrote:

> Added a preprocessing rule to fix this, seems to look better now :)

Very much appreciated!

Ali

P.S. Unfortunately, the disruption caused by the old forum program dying and porting the old messages to D forums was enough to finally kill the Turkish forums. There seems to be only three active users now, who use it only to announce the monthly Turkish #teaconfs. :)
April 01

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

>

(This post best viewed on forum.dlang.org!)

Is there any way we can put these guidelines somewhere so that we can link to them on the front page of forum.dlang.org? Newcomers and even community members will not know or forget this syntax.

Cheers,
RazvanN

April 01

On Thursday, 1 April 2021 at 08:22:53 UTC, RazvanN wrote:

>

Is there any way we can put these guidelines somewhere so that we can link to them on the front page of forum.dlang.org? Newcomers and even community members will not know or forget this syntax.

Of course. I'll add a help section and a link from the posting page.

April 01

On Thursday, 1 April 2021 at 08:48:10 UTC, Vladimir Panteleev wrote:

>

On Thursday, 1 April 2021 at 08:22:53 UTC, RazvanN wrote:

>

Is there any way we can put these guidelines somewhere so that we can link to them on the front page of forum.dlang.org? Newcomers and even community members will not know or forget this syntax.

Of course. I'll add a help section and a link from the posting page.

Awesome! Thank you for all your work!

Cheers,
RazvanN

« First   ‹ Prev
1 2 3 4 5 6 7