mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-09 13:05:55 +08:00
tabulation fixes
This commit is contained in:
@@ -135,8 +135,13 @@
|
||||
link: {
|
||||
pre: function preLink(scope, iElement, iAttrs, controller) {
|
||||
var tabs = parseInt(iAttrs.ngIncludeTabs || 0);
|
||||
controller.template = controller.template.replace(/^(.*)$/mg, '\t'.repeat(tabs) + '$1').replace(/\s*$/, '');
|
||||
console.log(controller);
|
||||
|
||||
var startRegex = new RegExp('\t'.repeat(tabs - 1));
|
||||
|
||||
controller.template = controller.template
|
||||
.replace(/^(.*)$/mg, '\t'.repeat(tabs) + '$1')
|
||||
.replace(startRegex, '')
|
||||
.replace(/\s*$/, '');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user