Vlad Protsenko преди 1 година
родител
ревизия
0c97507852
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      docs/en/manuals/editor-scripts.md

+ 4 - 2
docs/en/manuals/editor-scripts.md

@@ -129,7 +129,9 @@ Inside the `run` handler, you can query and change the in-memory editor state. Q
   query = {selection = {type = "outline", cardinality = "one"}},
   active = function(opts)
     local node = opts.selection
-    return editor.can_set(node, "position") and editor.can_set(node, "rotation") and editor.can_set(node, "scale")
+    return editor.can_set(node, "position") 
+       and editor.can_set(node, "rotation") 
+       and editor.can_set(node, "scale")
   end,
   run = function(opts)
     local node = opts.selection
@@ -157,7 +159,7 @@ Inside the `run` handler, you can write to files (using `io` module) and execute
   run = function(opts)
     local text = editor.get(opts.selection, "text")
     local new_text = editor.execute("jq", "-n", "--argjson", "data", text, "$data", {
-      reload_resources = false, -- don't reload resources since `jq`  does not modify files on disk
+      reload_resources = false, -- don't reload resources since jq does not touch disk
       out = "capture" -- return text output instead of nothing
     })
     editor.transact({ editor.tx.set(opts.selection, "text", new_text) })