Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

fixed ace template and generated files #13

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ace/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
</pre>

<script src="http://ajaxorg.github.com/ace/build/src/ace.js"></script>
<script src="http://ajaxorg.github.com/ace/build/src/mode-coffee.js"></script>
<script src="http://ajaxorg.github.com/ace/build/src/theme-solarized_dark.js"></script>
<script src="mode-gherkin-en.js"></script>
<script src="mode-gherkin-tr.js"></script>
Expand Down
43 changes: 41 additions & 2 deletions ace/mode-gherkin-ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:امثلة|سيناريو مخطط|سيناريو|الخلفية|خاصية):",
regex : "^\\s*(?:امثلة|سيناريو مخطط|سيناريو|الخلفية|خاصية):"
},
{
token : "keyword",
Expand All @@ -30,7 +30,7 @@ var GherkinHighlightRules = function()
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
43 changes: 41 additions & 2 deletions ace/mode-gherkin-bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:Примери|Рамка на сценарий|Сценарий|Предистория|Функционалност):",
regex : "^\\s*(?:Примери|Рамка на сценарий|Сценарий|Предистория|Функционалност):"
},
{
token : "keyword",
Expand All @@ -30,7 +30,7 @@ var GherkinHighlightRules = function()
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
45 changes: 42 additions & 3 deletions ace/mode-gherkin-bm.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:Contoh |Menggariskan Senario |Senario|Latar Belakang|Fungsi):",
regex : "^\\s*(?:Contoh|Menggariskan Senario|Template Keadaan|Template Situai|Template Senario|Keadaan|Situai|Senario|Latar Belakang|Fungsi):"
},
{
token : "keyword",
regex : "^\\s*(?:Tetapi |Dan |Kemudian |Apabila |Bagi |\\* )"
regex : "^\\s*(?:Tapi |Tetapi |Dan |Kemudian |Maka |Apabila |Bagi |Diberi |\\* )"
},
{
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
43 changes: 41 additions & 2 deletions ace/mode-gherkin-ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:Exemples|Esquema de l'escenari|Escenari|Antecedents|Rerefons|Funcionalitat|Característica):",
regex : "^\\s*(?:Exemples|Esquema de l'escenari|Escenari|Antecedents|Rerefons|Funcionalitat|Característica):"
},
{
token : "keyword",
Expand All @@ -30,7 +30,7 @@ var GherkinHighlightRules = function()
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
43 changes: 41 additions & 2 deletions ace/mode-gherkin-cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:Příklady|Osnova scénáře|Náčrt Scénáře|Scénář|Kontext|Pozadí|Požadavek):",
regex : "^\\s*(?:Příklady|Osnova scénáře|Náčrt Scénáře|Scénář|Kontext|Pozadí|Požadavek):"
},
{
token : "keyword",
Expand All @@ -30,7 +30,7 @@ var GherkinHighlightRules = function()
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
43 changes: 41 additions & 2 deletions ace/mode-gherkin-cy_gb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var GherkinHighlightRules = function()
},
{
token : "keyword.with_children",
regex : "^\\s*(?:Enghreifftiau|Scenario Amlinellol|Scenario|Cefndir|Arwedd):",
regex : "^\\s*(?:Enghreifftiau|Scenario Amlinellol|Scenario|Cefndir|Arwedd):"
},
{
token : "keyword",
Expand All @@ -30,7 +30,7 @@ var GherkinHighlightRules = function()
token : "string", // multi line """ string start
regex : '^\\s*"{3}.*$',
next : "qqstring"
},
}
],
"qqstring" : [ {
token : "string", // multi line """ string end
Expand Down Expand Up @@ -78,3 +78,42 @@ oop.inherits(Mode, TextMode);
exports.Mode = Mode;

});

define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {

var Range = require("../range").Range;

var MatchingBraceOutdent = function() {};

(function() {

this.checkOutdent = function(line, input) {
if (! /^\s+$/.test(line))
return false;

return /^\s*\}/.test(input);
};

this.autoOutdent = function(doc, row) {
var line = doc.getLine(row);
var match = line.match(/^(\s*\})/);

if (!match) return 0;

var column = match[1].length;
var openBracePos = doc.findMatchingBracket({row: row, column: column});

if (!openBracePos || openBracePos.row == row) return 0;

var indent = this.$getIndent(doc.getLine(openBracePos.row));
doc.replace(new Range(row, 0, row, column-1), indent);
};

this.$getIndent = function(line) {
return line.match(/^\s*/)[0];
};

}).call(MatchingBraceOutdent.prototype);

exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
Loading