<indentfold># CoffeeScript test
# Source: https://coffeescript.org

</indentfold><beginfold id='1'>###</beginfold id='1'> Multiline
<indentfold>  comment <endfold id='1'>###</endfold id='1'>
import 'local-file.coffee'

# Assignment:
number   = 42
opposite = true

# Conditions:
number = -42 if opposite

# Functions:
square = (x) -> x * x

# Arrays:
list = [1, 2, 3, 4, 5]

# Objects:
math =
  root:   Math.sqrt
  square: square
  cube:   (x) -> x * square x

# Splats:
race = (winner, runners...) ->
  print winner, runners

# Existence:
alert "I knew it!" if elvis?

# Array comprehensions:
cubes = (math.cube num for num in list)

# Classes:
class Animal
  constructor: (@name) ->

  move: (meters) ->
    alert @name + " moved #{meters}m."

# Switch/When/Else:
switch day
  when "Mon" then go work
  when "Tue" then go relax
  when "Thu" then go iceFishing
  when "Fri", "Sat"
    if day is bingoDay
      go bingo
      go dancing
  when "Sun" then go church
  else go work

# Member objects:
Object.prop.  Object .Object Object
timelineEvent.class

# Embedded JavaScript Code
</indentfold>markdown = <beginfold id='2'>`</beginfold id='2'>function () <beginfold id='3'>{</beginfold id='3'>
  return <beginfold id='4'>\`</beginfold id='4'>In Markdown, write code like \\\`this\\\`<endfold id='4'>\`</endfold id='4'>;
<indentfold><endfold id='3'>}</endfold id='3'><endfold id='2'>`</endfold id='2'>

</indentfold><beginfold id='5'>```</beginfold id='5'>
  // Comment
  var array = new Array(500);
  var name = "Willy";
  alert(<beginfold id='6'>`</beginfold id='6'>Hello ${name}!<endfold id='6'>`</endfold id='6'>);
<indentfold><endfold id='5'>```</endfold id='5'>
<beginfold id='2'>`</beginfold id='2'> String.raw<beginfold id='4'>\`</beginfold id='4'>String ${x} <endfold id='4'>\`</endfold id='4'> <endfold id='2'>`</endfold id='2'>

</indentfold><beginfold id='2'>`</beginfold id='2'> // Regular Expression after template
  const a = <beginfold id='4'>\`</beginfold id='4'>6<endfold id='4'>\`</endfold id='4'> / 2; <beginfold id='7'>/*</beginfold id='7'>comment<endfold id='7'>*/</endfold id='7'>
<indentfold>  <beginfold id='4'>\`</beginfold id='4'>template<endfold id='4'>\`</endfold id='4'> /regex/ <endfold id='2'>`</endfold id='2'>

</indentfold><beginfold id='2'>`</beginfold id='2'> // Tagged template literals
<indentfold>  tagFunc<beginfold id='4'>\`</beginfold id='4'>Setting ${setting} is ${value}!<endfold id='4'>\`</endfold id='4'> <endfold id='2'>`</endfold id='2'>
