0 votes

Hi, I'm a web developer, and I'd be happy to contribute to this great project.

Thank you everyone for creating such a great project!

Whenever I'm here on Godot Q&A I find it always hard to read the questions and answers, and one of the reasons is that this website has no syntax highlighting. Code and text are blended together in a very hard to read result.

So, I have two questions:

  1. Is there any plan to move to some other platform, like discourse or something else alike?
  2. Is there any way I can suggest the introduction of syntax highlighting (even on this platform) and possibly contribute to it?

Example of how code looks now (using code sample pressing the { } button):

extends Node

export (PackedScene) var mob_scene = preload("res://Mob.tscn")

func _ready():
randomize()

func _on_MobTimer_timeout():
var mob = mob_scene.instance()
var mob_spawn_location = $SpawnPath/SpawnPathFollow
mob_spawn_location.unit_offset = randf()

var player_position = $Player.transform.origin

add_child(mob)
mob.initialise(mob_spawn_location.translation, player_position)

The indentation is totally messed up, and very time consuming to fix.


Another example, but using the ```` ` syntax:

```
extends Node

export (PackedScene) var mob_scene = preload("res://Mob.tscn")

func _ready():
randomize()

func onMobTimertimeout():
var mob = mob
scene.instance()
var mobspawnlocation = $SpawnPath/SpawnPathFollow
mobspawnlocation.unit_offset = randf()

var player_position = $Player.transform.origin

add_child(mob)
mob.initialise(mob_spawn_location.translation, player_position)

```


Restating my questions:

  1. Is there any plan to move to some other platform, like discourse or something else alike?
  2. Is there any way I can suggest the introduction of syntax highlighting (even on this platform) and possibly contribute to it?
in Engine by (29 points)
edited by

The indentation is totally messed up, and very time consuming to fix.

I had a look at the code you pasted and it is messed up already. You mixed tabs and spaces (or the website mixed tabs and space, no idea how).

I have no idea if there are plans to change.
Maybe you could open an issue on https://github.com/godotengine/godot-website/issues
Or contact devs on Godot.Chat, I think there is a website room: https://chat.godotengine.org/home

Thanks Zylann, I'll try to discuss the issue there!

About the code above, the code I pasted was correct, but the thing that the { } button does, is to indent your code with some spaces, so when then you then paste your code from Godot, it becomes so messed up XD It can be fixed, but it's definitely time-consuming.

Yeah usually I dont really use that button. Instead I just select the code in my editor, indent it by 1 level by pressing Tab once, copypaste it directly into the website and it works fine.

Oh, that's a very nice workaround until we have something better!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.