"Hello World" - Anon
about 2 years ago

[code]
#include

int main() {
printf("First hello world!\n");

return 0;

}
[/code]

d3d1rty - #2
about 2 years ago

Replying to: OP

Hey, Anon, you can use backticks to fence in code blocks. Like this:

```
5.times do
puts 'hello'
end
```

becomes...

5.times do
  puts 'hello'
end
d3d1rty - #3
about 2 years ago

Replying to: #2

....and if you want to do syntax highlighting, just add the language in lowercase at the end of the first fence.

```ruby
5.times do
puts 'hello'
end
```

becomes...

5.times do
  puts 'hello'
end
Anon - #4
about 2 years ago

Replying to: #2

yeah thanks, I noticed that myself after posting it that it is just markdown and not 4cuck syntax 😂

Anon - #17
almost 2 years ago

Replying to: OP

5.times do
puts 'hello'
end
Anon - #18
almost 2 years ago

Replying to: OP

Theorem mult_0_plus: forall n m : nat,
    (0 + n) * m = n * m.
Proof.
  intros n m.
  assert (H: 0 + n = n).
  {
    reflexivity.
  }
  rewrite -> H.
  reflexivity.
Qed.
Anon - #19
almost 2 years ago

Replying to: #18

Code highlighting does not work for Coq. :(

Anon - #20
almost 2 years ago

Replying to: OP

I propose we use hl.js instead doing it on the server like savages 😏

Anon - #21
almost 2 years ago

Replying to: OP

let pr = print_endline in
   pr "Hello, world!"
d3d1rty - #23
almost 2 years ago

Replying to: #20

Begone! 🖐

d3d1rty - #24
almost 2 years ago

Replying to: #19

If you look here, you'll see the lists of scanners that we use to for the syntax highlighting feature. We could implement a custom scanner for any language that isn't covered, though I'm not familiar with Coq.

Anon - #26
almost 2 years ago
d3d1rty - #29
almost 2 years ago

Replying to: #26

I'm not opposed to using highlight.js to take care of syntax highlighting instead of Coderay.

New Reply