Skip to content

Commit

Permalink
Release Apply render preset v2.1.4 (#1390)
Browse files Browse the repository at this point in the history
Fix parsing of mixed quotes in reaper-render2.ini [cfillion/reascripts#7]
  • Loading branch information
cfillion authored May 15, 2024
1 parent 0df94a2 commit 66b6f11
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Rendering/cfillion_Apply render preset.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- @description Apply render preset
-- @author cfillion
-- @version 2.1.3
-- @changelog Minor optimization and internal code cleanup
-- @version 2.1.4
-- @changelog Fix parsing of mixed quotes in reaper-render2.ini [cfillion/reascripts#7]
-- @provides
-- .
-- [main] . > cfillion_Apply render preset (create action).lua
Expand Down Expand Up @@ -259,13 +259,14 @@ local function tokenize(line)
while pos do
local tail, eat = nil, 1

if line:sub(pos, pos) == '"' then
local quote = line:sub(pos, pos)
if quote == '"' or quote == "'" or quote == '`' then
pos = pos + 1 -- eat the opening quote
tail = line:find('"%s', pos)
tail = line:find(quote .. '%s', pos)
eat = 2

if not tail then
if line:sub(-1) == '"' then
if line:sub(-1) == quote then
tail = line:len()
else
error('missing closing quote')
Expand Down

0 comments on commit 66b6f11

Please sign in to comment.