added example for yaml

This commit is contained in:
Meg Sharkey 2012-03-12 16:39:06 -07:00
commit f684fed674
10 changed files with 284 additions and 22 deletions

View file

@ -125,7 +125,8 @@ var modes = [
new Mode("svg", "SVG", require("ace/mode/SVG").Mode, ["svg"]),
new Mode("text", "Text", require("ace/mode/text").Mode, ["txt"]),
new Mode("textile", "Textile", require("ace/mode/textile").Mode, ["textile"]),
new Mode("xml", "XML", require("ace/mode/xml").Mode, ["xml"])
new Mode("xml", "XML", require("ace/mode/xml").Mode, ["xml"]),
new Mode("yaml", "YAML", require("ace/mode/yaml").Mode, ["yaml"])
];
modesByName = {};
@ -168,6 +169,10 @@ var docs = [
"xml", "XML",
require("ace/requirejs/text!./docs/xml.xml")
),
new Doc(
"yaml", "YAML",
require("ace/requirejs/text!./docs/yaml.yaml")
),
new Doc(
"svg", "SVG",
require("ace/requirejs/text!./docs/svg.svg")

View file

@ -0,0 +1,35 @@
# This sample document was taken from wikipedia:
# http://en.wikipedia.org/wiki/YAML#Sample_document
---
receipt: Oz-Ware Purchase Invoice
date: 2007-08-06
customer:
given: Dorothy
family: Gale
items:
- part_no: 'A4786'
descrip: Water Bucket (Filled)
price: 1.47
quantity: 4
- part_no: 'E1628'
descrip: High Heeled "Ruby" Slippers
size: 8
price: 100.27
quantity: 1
bill-to: &id001
street: |
123 Tornado Alley
Suite 16
city: East Centerville
state: KS
ship-to: *id001
specialDelivery: >
Follow the Yellow Brick
Road to the Emerald City.
Pay no attention to the
man behind the curtain.