small cleanup
This commit is contained in:
parent
844502fae6
commit
c80ae070f7
1 changed files with 3 additions and 2 deletions
|
|
@ -264,13 +264,14 @@ AceEmmetEditor.prototype = {
|
|||
// by default, abbreviation parser generates all unlinked (un-mirrored)
|
||||
// tabstops as ${0}, so we have upgrade all caret tabstops with unique
|
||||
// positions but make sure that all other tabstops are not linked accidentally
|
||||
// based on https://github.com/sergeche/emmet-sublime/blob/master/editor.js#L119-L171
|
||||
$updateTabstops: function(value) {
|
||||
var base = 1000;
|
||||
var zeroBase = 0;
|
||||
var lastZero = null;
|
||||
var range = emmet.require('range');
|
||||
var ts = emmet.require('tabStops');
|
||||
|
||||
var settings = emmet.require('resources').getVocabulary("user");
|
||||
var tabstopOptions = {
|
||||
tabstop: function(data) {
|
||||
var group = parseInt(data.group, 10);
|
||||
|
|
@ -303,7 +304,7 @@ AceEmmetEditor.prototype = {
|
|||
|
||||
value = ts.processText(value, tabstopOptions);
|
||||
|
||||
if (/*sublimeGetOption('insert_final_tabstop', false)*/ false && !/\$\{0\}$/.test(value)) {
|
||||
if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
|
||||
value += '${0}';
|
||||
} else if (lastZero) {
|
||||
value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue