mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-16 02:55:03 +00:00
Initial port to vue 3
This commit is contained in:
parent
e1966534d5
commit
454981fa1f
14 changed files with 1906 additions and 1804 deletions
|
@ -1,7 +1,7 @@
|
|||
import Vue from "vue";
|
||||
import { Directive } from "vue";
|
||||
|
||||
Vue.directive("trim-indents", {
|
||||
bind(el, binding) {
|
||||
export const trimIndents: Directive = {
|
||||
beforeMount(el, binding) {
|
||||
const withoutStartEndWhitespace = el.innerHTML.replace(/(^\n+|\n+$)/g, "");
|
||||
|
||||
const mode = binding.value != null ? binding.value : "start";
|
||||
|
@ -22,4 +22,4 @@ Vue.directive("trim-indents", {
|
|||
.map((line) => line.slice(spacesToTrim))
|
||||
.join("\n");
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue