Playing around with Rouge

A few code examples

This is just a few examples on how Rouge works. As for now

A simple javascript block

function hello($world) {
  console.log($world)
}

A flow block (typescript syntax.highlighting)

let obj: string
obj = 'yo'
// Error: number: This type is incompatible with string
obj = 10
function sayIt(what: string) {
  return `Saying: ${what}`
}
const said: string = sayIt(obj)

A flow block (javascript syntax.highlighting)

let obj: string
obj = 'yo'
// Error: number: This type is incompatible with string
obj = 10
function sayIt(what: string) {
  return `Saying: ${what}`
}
const said: string = sayIt(obj)

A flow block (flow syntax.highlighting)

let obj: string
obj = 'yo'
// Error: number: This type is incompatible with string
obj = 10
function sayIt(what: string) {
  return `Saying: ${what}`
}
const said: string = sayIt(obj)

A flow block with print

let obj: string
obj = 'yo'
// Error: number: This type is incompatible with string
obj = 10
function sayIt(what: string) {
  return `Saying: ${what}`
}
const said: string = sayIt(obj)
print(said)
function square(n: number): number {
  return n * n;
}