module SyntaxTree::Mermaid

def escape(label)

HTML entities such that they render properly within the quotes.
Escape a label to be used in the mermaid syntax. This is used to escape
def escape(label)
  "\"#{CGI.escapeHTML(label)}\""
end

def flowchart

returned.
the flowchart will be rendered. Otherwise, the flowchart will be
Create a new flowchart. If a block is given, it will be yielded to and
def flowchart
  flowchart = FlowChart.new
  if block_given?
    yield flowchart
    flowchart.render
  else
    flowchart
  end
end