Merge remote-tracking branch 'remotes/upstream/master'
Conflicts: lib/ace/commands/command_manager.js lib/ace/test/mockrenderer.js lib/ace/test/all_browser.js
This commit is contained in:
commit
1254357d92
359 changed files with 27169 additions and 12874 deletions
|
|
@ -64,7 +64,6 @@ var Doc = function(name, desc, file) {
|
|||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.doc = new EditSession(file);
|
||||
this.doc.setMode(modesByName[name].mode);
|
||||
this.doc.modeName = name;
|
||||
this.doc.setUndoManager(new UndoManager());
|
||||
};
|
||||
|
|
@ -103,6 +102,7 @@ var modes = [
|
|||
new Mode("json", "JSON", ["json"]),
|
||||
new Mode("latex", "LaTeX", ["tex"]),
|
||||
new Mode("lua", "Lua", ["lua"]),
|
||||
new Mode("liquid", "Liquid", ["liquid"]),
|
||||
new Mode("markdown", "Markdown", ["md", "markdown"]),
|
||||
new Mode("ocaml", "OCaml", ["ml", "mli"]),
|
||||
new Mode("perl", "Perl", ["pl", "pm"]),
|
||||
|
|
@ -118,7 +118,8 @@ var modes = [
|
|||
new Mode("text", "Text", ["txt"]),
|
||||
new Mode("textile", "Textile", ["textile"]),
|
||||
new Mode("xml", "XML", ["xml"]),
|
||||
new Mode("sh", "SH", ["sh"])
|
||||
new Mode("sh", "SH", ["sh"]),
|
||||
new Mode("xquery", "XQuery", ["xq"])
|
||||
];
|
||||
|
||||
modesByName = {};
|
||||
|
|
@ -193,6 +194,10 @@ var docs = [
|
|||
"lua", "Lua",
|
||||
require("ace/requirejs/text!./docs/lua.lua")
|
||||
),
|
||||
new Doc(
|
||||
"liquid", "Liquid",
|
||||
require("ace/requirejs/text!./docs/liquid.liquid")
|
||||
),
|
||||
new Doc(
|
||||
"java", "Java",
|
||||
require("ace/requirejs/text!./docs/java.java")
|
||||
|
|
@ -229,6 +234,10 @@ var docs = [
|
|||
"sh", "SH",
|
||||
require("ace/requirejs/text!./docs/sh.sh")
|
||||
),
|
||||
new Doc(
|
||||
"xquery", "XQuery",
|
||||
require("ace/requirejs/text!./docs/xquery.xq")
|
||||
),
|
||||
new WrappedDoc(
|
||||
"markdown", "Markdown",
|
||||
require("ace/requirejs/text!./docs/markdown.md")
|
||||
|
|
@ -324,6 +333,12 @@ bindDropdown("mode", function(value) {
|
|||
|
||||
bindDropdown("doc", function(value) {
|
||||
var doc = docsByName[value].doc;
|
||||
|
||||
if (!docsByName[value].initialized) {
|
||||
docsByName[value].initialized = true;
|
||||
doc.setMode(modesByName[docsByName[value].name].mode);
|
||||
}
|
||||
|
||||
var session = env.split.setSession(doc);
|
||||
session.name = doc.name;
|
||||
|
||||
|
|
|
|||
76
demo/kitchen-sink/docs/liquid.liquid
Normal file
76
demo/kitchen-sink/docs/liquid.liquid
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
The following examples can be found in full at http://liquidmarkup.org/
|
||||
|
||||
Liquid is an extraction from the e-commerce system Shopify.
|
||||
Shopify powers many thousands of e-commerce stores which all call for unique designs.
|
||||
For this we developed Liquid which allows our customers complete design freedom while
|
||||
maintaining the integrity of our servers.
|
||||
|
||||
Liquid has been in production use since June 2006 and is now used by many other
|
||||
hosted web applications.
|
||||
|
||||
It was developed for usage in Ruby on Rails web applications and integrates seamlessly
|
||||
as a plugin but it also works excellently as a stand alone library.
|
||||
|
||||
Here's what it looks like:
|
||||
|
||||
<ul id="products">
|
||||
{% for product in products %}
|
||||
<li>
|
||||
<h2>{{ product.title }}</h2>
|
||||
Only {{ product.price | format_as_money }}
|
||||
|
||||
<p>{{ product.description | prettyprint | truncate: 200 }}</p>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
||||
Some more features include:
|
||||
|
||||
<h2>Filters</h2>
|
||||
<p> The word "tobi" in uppercase: {{ 'tobi' | upcase }} </p>
|
||||
<p>The word "tobi" has {{ 'tobi' | size }} letters! </p>
|
||||
<p>Change "Hello world" to "Hi world": {{ 'Hello world' | replace: 'Hello', 'Hi' }} </p>
|
||||
<p>The date today is {{ 'now' | date: "%Y %b %d" }} </p>
|
||||
|
||||
|
||||
<h2>If</h2>
|
||||
<p>
|
||||
{% if user.name == 'tobi' or user.name == 'marc' %}
|
||||
hi marc or tobi
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Case</h2>
|
||||
<p>
|
||||
{% case template %}
|
||||
{% when 'index' %}
|
||||
Welcome
|
||||
{% when 'product' %}
|
||||
{{ product.vendor | link_to_vendor }} / {{ product.title }}
|
||||
{% else %}
|
||||
{{ page_title }}
|
||||
{% endcase %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>For Loops</h2>
|
||||
<p>
|
||||
{% for item in array %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Tables</h2>
|
||||
<p>
|
||||
{% tablerow item in items cols: 3 %}
|
||||
{% if tablerowloop.col_first %}
|
||||
First column: {{ item.variable }}
|
||||
{% else %}
|
||||
Different column: {{ item.variable }}
|
||||
{% endif %}
|
||||
{% endtablerow %}
|
||||
</p>
|
||||
6
demo/kitchen-sink/docs/xquery.xq
Normal file
6
demo/kitchen-sink/docs/xquery.xq
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
xquery version "1.0";
|
||||
|
||||
let $message := "Hello World!"
|
||||
return <results>
|
||||
<message>{$message}</message>
|
||||
</results>
|
||||
Loading…
Add table
Add a link
Reference in a new issue