diff options
author | Francesco <francesco.bbt@gmail.com> | 2021-08-17 22:44:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 22:44:17 +0200 |
commit | 49d3d21c987645b448184a752043946ed90d6031 (patch) | |
tree | b187286f2ed78fa9317f288dc0c5144840bcdad9 /plugins/autowrap.lua | |
parent | a42a0d57b08a9080ed9fd8fa84f1269e3847980f (diff) | |
parent | 9689846686f77dc0aa1e6f4d31fbfc42998c2085 (diff) | |
download | lite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.tar.gz lite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.zip |
Merge pull request #45 from lite-xl/2.0
2.0 Merge
Diffstat (limited to 'plugins/autowrap.lua')
-rw-r--r-- | plugins/autowrap.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua index 1d5d08d..38f8eb3 100644 --- a/plugins/autowrap.lua +++ b/plugins/autowrap.lua @@ -1,10 +1,10 @@ --- mod-version:1 -- lite-xl 1.16 +-- mod-version:2 -- lite-xl 2.0 require "plugins.reflow" local config = require "core.config" local command = require "core.command" local DocView = require "core.docview" -config.autowrap_files = { "%.md$", "%.txt$" } +config.plugins.autowrap = { files = { "%.md$", "%.txt$" } } local on_text_input = DocView.on_text_input @@ -15,7 +15,7 @@ DocView.on_text_input = function(self, ...) -- early-exit if the filename does not match a file type pattern local filename = self.doc.filename or "" local matched = false - for _, ptn in ipairs(config.autowrap_files) do + for _, ptn in ipairs(config.plugins.autowrap.files) do if filename:match(ptn) then matched = true break |