diff options
author | Guldoman <giulio.lettieri@gmail.com> | 2022-11-02 08:10:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 08:10:57 +0100 |
commit | 9bf5649c7df6bbd746956e9a96b616f61a59fa9b (patch) | |
tree | 725e2d12dc826f8ebe73807a705371cb4c5af4d9 /plugins/titleize.lua | |
parent | 49139e03398c9d0ecb347267a4882a4eb3f7ee23 (diff) | |
download | lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.tar.gz lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.zip |
Use new `command.add` syntax (#136)
Diffstat (limited to 'plugins/titleize.lua')
-rw-r--r-- | plugins/titleize.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/titleize.lua b/plugins/titleize.lua index 16d20b0..096265c 100644 --- a/plugins/titleize.lua +++ b/plugins/titleize.lua @@ -3,8 +3,8 @@ local core = require "core" local command = require "core.command" command.add("core.docview", { - ["titleize:titleize"] = function() - core.active_view.doc:replace(function(text) + ["titleize:titleize"] = function(dv) + dv.doc:replace(function(text) return text:gsub("%f[%w](%w)", string.upper) end) end, |