From 35e71cfa49b3024e0c7bb8195d9844fe23a6b928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Wed, 5 Mar 2025 15:00:11 +0100 Subject: [PATCH] Improve sentence splitting logic --- Addon/Code/QuestParser.lua | 2 +- sync.sh | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Addon/Code/QuestParser.lua b/Addon/Code/QuestParser.lua index 6bfae69..76b4470 100755 --- a/Addon/Code/QuestParser.lua +++ b/Addon/Code/QuestParser.lua @@ -8,7 +8,7 @@ end local function SplitSentences(paragraph) local sentences = {} - for sentence in string.gmatch(paragraph, "([^,%.%?!]+[,%.%?!]?)[%s]*") do + for sentence in string.gmatch(paragraph, "([^%.%?!]+[%.%?!]?)[%s]*") do local trimmed = sentence:gsub("^%s+", ""):gsub("%s+$", "") if #trimmed > 0 then table.insert(sentences, trimmed) diff --git a/sync.sh b/sync.sh index 740bbfc..661846a 100644 --- a/sync.sh +++ b/sync.sh @@ -2,12 +2,12 @@ src_folder="." -#wow_source_folder="retail" -#wow_destiny_folder="retail" +wow_source_folder="retail" +wow_destiny_folder="retail" #wow_destiny_folder="beta" -wow_source_folder="classic_era" -wow_destiny_folder="classic_era" +#wow_source_folder="classic_era" +#wow_destiny_folder="classic_era" # CLASSIC ERA dest_folder="/Applications/World of Warcraft/_${wow_destiny_folder}_/Interface/AddOns/CzechQuests" @@ -16,5 +16,4 @@ fswatch -o "$src_folder" | while read -r change; do rsync -avu --delete "$src_folder" "$dest_folder" --exclude={'.*','*.png','*.sh','*.md','Addon/Data/**','downloader/**'} rsync -au --delete "$src_folder/Addon/Data/$wow_source_folder/" "$dest_folder/Addon/Data/" cp "$src_folder/Addon/Data/other.lua" "$dest_folder/Addon/Data/" -done - +done \ No newline at end of file