Jump to page: 1 2
Thread overview
Forum posting question ... how post a thread question with color syntax highlighting ??
Sep 05, 2021
james.p.leblanc
Sep 05, 2021
jfondren
Sep 05, 2021
james.p.leblanc
Sep 05, 2021
someone
Sep 06, 2021
Mike Parker
Sep 06, 2021
Ali Çehreli
Sep 06, 2021
Mike Parker
Sep 06, 2021
someone
September 05, 2021

Dear All,

I have noticed that quite a few posts and responses on this
forum include d snippets made with nicely colored syntax highlighting.
(I do not mean just the bold markdown text.)

This increases post clarity significantly.

How is this being done? (I hope that this is not considered off
topic. My goal would be able to make such posts myself. But also,
if more post in this manner, it may help many.)

Best Regards,
James

September 05, 2021

On Sunday, 5 September 2021 at 17:48:51 UTC, james.p.leblanc wrote:

>

Dear All,

I have noticed that quite a few posts and responses on this
forum include d snippets made with nicely colored syntax highlighting.
(I do not mean just the bold markdown text.)

This increases post clarity significantly.

How is this being done? (I hope that this is not considered off
topic. My goal would be able to make such posts myself. But also,
if more post in this manner, it may help many.)

Best Regards,
James

There's a checkbox below the post next to 'Enable Markdown'. You've found that with the bold markdown. If you click 'Markdown', it's a link to https://forum.dlang.org/help#markdown which includes an example of syntax highlighting:

```d
// I have a backslash in front of ```
string s = "so this isn't highlighted";
```

// no backslash
string s = "this has d syntax highlighting";
September 05, 2021

On 9/5/21 1:48 PM, james.p.leblanc wrote:

>

Dear All,

I have noticed that quite a few posts and responses on this
forum include d snippets made with nicely colored syntax highlighting.
(I do not mean just the bold markdown text.)

This increases post clarity significantly.

How is this being done?  (I hope that this is not considered off
topic.  My goal would be able to make such posts myself.  But also,
if more post in this manner, it may help many.)

The markdown link in the forum UI should tell you how it works.

In case you can't find it, the info is here

-Steve

September 05, 2021

On Sunday, 5 September 2021 at 17:55:09 UTC, Steven Schveighoffer wrote:

>

On 9/5/21 1:48 PM, james.p.leblanc wrote:

>

Dear All,

>

In case you can't find it, the info is here

-Steve

THANKS! (Also ... sigh ... I swear I have looked at the
markdon page that Steve linked to several times!

But, my eyes had been looking for the beautiful green and blue
text as an example ... So, I completely missed the fact
that the "highlight syntax" in the box was exactly what
I was looking for.

My fault completely ... sorry for injecting noise!

James
(Sheepishly backing away from my keyboard now).

September 05, 2021

On 9/5/21 2:07 PM, james.p.leblanc wrote:

>

But, my eyes had been looking for the beautiful green and blue
text as an example ...  So, I completely missed the fact
that the "highlight syntax" in the box was exactly what
I was looking for.

Actually, it may not be a bad idea to make that example markdown more colorful by adding some keywords and comments. Maybe instead of

writeln("D is great!");

it could be:

// should be highlighted!
auto str = "D is great!";

-Steve

September 05, 2021

On Sunday, 5 September 2021 at 17:55:09 UTC, Steven Schveighoffer wrote:

>

-Steve

Slightly off-topic but ... while-we-are-the-subject:

I usually post with markdown enabled and enclose code within ```d

Sometimes, I notice that replies to my posts came without markdown, and until now, I assumed not everyone likes markdown so when I reply once again I do it without markdown even while it is far more difficult to read the post (from my point of view, that is).

Question is: is it considered bad-etiquette within this forum to reply with markdown-enabled to someone using no-markdown at all ?

For example; IIRC Ali's posts are always no-markdown.

September 06, 2021

On Sunday, 5 September 2021 at 23:24:16 UTC, someone wrote:

>

Slightly off-topic but ... while-we-are-the-subject:

I usually post with markdown enabled and enclose code within ```d

Sometimes, I notice that replies to my posts came without markdown, and until now, I assumed not everyone likes markdown so when I reply once again I do it without markdown even while it is far more difficult to read the post (from my point of view, that is).

Question is: is it considered bad-etiquette within this forum to reply with markdown-enabled to someone using no-markdown at all ?

For example; IIRC Ali's posts are always no-markdown.

It doesn’t matter. Some people access the forums via the newsgroups or mailing lists, so they’re going to see the raw markdown in every post that uses it, whether it’s a direct reply to them or not.

Markdown support is mostly for the web interface, and is a minimally intrusive way to provide it so that it’s not too disruptive for people not using it.

September 05, 2021
On 9/5/21 4:24 PM, someone wrote:
>
> For example; IIRC Ali's posts are always no-markdown.
>

That's because I've been using Thunderbird for mail and news for a long time now and unfortunately it is impossible to convince Thunderbird to add the necessary header field. (Vladimir has a recommendation where I can run a simply local server that augments Thunderbird's headers but I haven't tried it yet.)

I should go back to using Emacs for news. I am pretty sure it will be configurable.

Ali

September 06, 2021

On 9/5/21 9:18 PM, Ali Çehreli wrote:

>

On 9/5/21 4:24 PM, someone wrote:

>

For example; IIRC Ali's posts are always no-markdown.

That's because I've been using Thunderbird for mail and news for a long time now and unfortunately it is impossible to convince Thunderbird to add the necessary header field. (Vladimir has a recommendation where I can run a simply local server that augments Thunderbird's headers but I haven't tried it yet.)

I should go back to using Emacs for news. I am pretty sure it will be configurable.

Ali

This is exactly how I do it. Though I have started creating an iopipe-based clone cause I wanted to see if I could do it. Unfortunately std.io is not mature enough.

I plan to have a dub project so you can just dub run thunderbirdmarkdown and now you have a solution.

And to answer someone's question, I think everyone is fine with markdown, they just don't always have the capability.

I will note though, that some people use the mechanism for links that puts the link at the bottom of the post, and this can be annoying when you reply, if you don't include the link definition, it doesn't render correctly.

-Steve

September 06, 2021

On Monday, 6 September 2021 at 13:23:21 UTC, Steven Schveighoffer wrote:

>

I will note though, that some people use the mechanism for links that puts the link at the bottom of the post, and this can be annoying when you reply, if you don't include the link definition, it doesn't render correctly.

Now that's interesting. I had assumed it would be less annoying than having them inline. Especially since people had already adopted a similar convention before we got Markdown support. I gave up on Thuderbird and went full-on with the web interface a couple of years ago, so I've had no view of the experience post-Markdown.

« First   ‹ Prev
1 2