Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow `:` in abbreviation’s attribute names

  • Loading branch information...
commit bfd20fc99f212feaf1bf0dad54333afe3d0f1fe9 1 parent 2f836fb
Sergey Chikuyonok sergeche authored
2  javascript/elements.js
View
@@ -5,7 +5,7 @@
*/
emmet.define('elements', function(require, _) {
var factories = {};
- var reAttrs = /([\w\-]+)\s*=\s*(['"])(.*?)\2/g;
+ var reAttrs = /([\w\-:]+)\s*=\s*(['"])(.*?)\2/g;
var result = {
/**
19 javascript/unittest/tests/expandAbbreviation.js
View
@@ -14,7 +14,13 @@
'dol': '\\$db->connect()\n\t\\$\\$\\$more dollaz$',
'erb': '<%= |${child} %>'
}
+ },
+ 'xml': {
+ 'abbreviations': {
+ 'use': '<use xlink:href=""/>'
+ }
}
+
};
QUnit.moduleStart(function(obj) {
@@ -140,12 +146,13 @@
test('Other patterns', function() {
runTest('script', '<script></script>');
- runTest('script:src', '<script src=""></script>');
- runTest('img', '<img src="" alt="" />');
- runTest('input:c', '<input type="checkbox" name="" id="" />');
- runTest('some:elem', '<some:elem></some:elem>');
- runTest('li#id$.class$*3', '<li id="id1" class="class1"></li><li id="id2" class="class2"></li><li id="id3" class="class3"></li>');
- runTest('select#test', '<select name="" id="test"></select>');
+ runTest('script:src', '<script src=""></script>');
+ runTest('img', '<img src="" alt="" />');
+ runTest('input:c', '<input type="checkbox" name="" id="" />');
+ runTest('some:elem', '<some:elem></some:elem>');
+ runTest('li#id$.class$*3', '<li id="id1" class="class1"></li><li id="id2" class="class2"></li><li id="id3" class="class3"></li>');
+ runTest('select#test', '<select name="" id="test"></select>');
+ runTest('use', 'xml', 'plain', '<use xlink:href="" />');
});
test('XSL', function() {
Please sign in to comment.
Something went wrong with that request. Please try again.