Code syntax

Make requests and get help.

Moderator: Manveer

Post Reply
User avatar
Mattjd
Registered User
Posts: 860
Joined: Mon Sep 18, 2017 8:52 pm
Age: 31

Code syntax

#1

Post by Mattjd » Mon May 28, 2018 3:13 pm

Is it possible to get language syntax when using a code block?

User avatar
cwd
Registered User
Posts: 3400
Joined: Fri Sep 15, 2017 8:34 am
Location: central Ohio
Age: 58

Re: Code syntax

#2

Post by cwd » Mon May 28, 2018 3:56 pm

You mean syntax highlighting, like in a programmer's editor? Not on this forum I don't think. How would it even know what language you were using?

User avatar
mgil
Shitpostmaster General
Posts: 8483
Joined: Wed Sep 13, 2017 5:46 pm
Location: FlabLab©®
Age: 49

Re: Code syntax

#3

Post by mgil » Mon May 28, 2018 4:06 pm

cwd wrote: Mon May 28, 2018 3:56 pm You mean syntax highlighting, like in a programmer's editor? Not on this forum I don't think. How would it even know what language you were using?
The tag takes an argument, right?

Code: Select all

URMOM.GT.ALL
That would be the possible way to make it work, if it could. I think?

ETA: I put code=fortran and it still parsed the tag.

User avatar
cwd
Registered User
Posts: 3400
Joined: Fri Sep 15, 2017 8:34 am
Location: central Ohio
Age: 58

Re: Code syntax

#4

Post by cwd » Tue May 29, 2018 5:40 am

True, you could add a tag.

You'd have to find a bunch of language parsers written in whatever language this website uses (JS?) and take the perf hit to run them on the code blocks.

This would be a very good feature for a coding forum, maybe not worthwhile on a lifting forum.

Post Reply