diff options
author | garret <garret@airmail.cc> | 2021-09-30 00:23:28 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-09-30 00:37:09 +0100 |
commit | 04a61982e82a5df1cb2ec77a5d9752782a7c41e0 (patch) | |
tree | 35ec751a28b717a7cc6158f84357408173339bff /em-dash.lua | |
parent | 2a9e07ff9a5f7084d3e2e54ff5d065f9b0a93591 (diff) | |
download | aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.tar.gz aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.tar.bz2 aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.zip |
macro folder
the beginning of becoming like every other cartel-aproved script repo in existence
Diffstat (limited to 'em-dash.lua')
-rw-r--r-- | em-dash.lua | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/em-dash.lua b/em-dash.lua deleted file mode 100644 index 99d22df..0000000 --- a/em-dash.lua +++ /dev/null @@ -1,27 +0,0 @@ -script_name = "Em-dash" -script_description = "I do not have an em-dash key on my keyboard" -script_author = "garret" -script_version = "2021-04-05" -em = "—" -function append(sub, sel) - for si, li in ipairs(sel) do - local line = sub[li] - line.text = line.text..em - sub[li] = line - end - aegisub.set_undo_point(script_name) -end - -function replace(sub, sel) - for si, li in ipairs(sel) do - local line = sub[li] - local text = sub[li].text - text = text:gsub("%-%-",em) - line.text=text - sub[li] = line - end - aegisub.set_undo_point(script_name) -end - -aegisub.register_macro(script_name.."/Append", "Appends an Em-dash to the selected line(s)", append) -aegisub.register_macro(script_name.."/Replace", "Replaces -- with "..em, replace) |