Skip to content

Commit a3613c4

Browse files
committed
Fix name function bug
1 parent 7ad7a20 commit a3613c4

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

highlightsync.koplugin/main.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,21 @@ end
3232
function Highlightsync.onSync(local_path, cached_path, income_path)
3333

3434
local local_highlights = dofile(local_path)
35-
3635
local cached_highlights
3736
local success, result = pcall(dofile, cached_path)
3837
if success then
3938
cached_highlights = result
4039
else
4140
cached_highlights = {}
4241
end
43-
4442
local income_highlights
4543
local success, result = pcall(dofile, income_path)
4644
if success then
4745
income_highlights = result
4846
else
4947
income_highlights = {}
5048
end
51-
52-
local annotations = Merge.Merge_highlights(local_highlights,income_highlights,cached_highlights)
49+
local annotations = Merge.merge_highlights(local_highlights,income_highlights,cached_highlights)
5350

5451
salt.save(annotations,SidecarDir .. "/" .. FileName .. ".lua",true) -- Save annotations local
5552
DataAnnotations = annotations

highlightsync.koplugin/merge.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ local function get_newer(item1, item2)
4343
end
4444

4545
-- Function to merge highlights from local, server, and last sync versions
46-
function Merge_highlights(local_annotations, server_annotations, last_sync_annotations)
46+
function merge_highlights(local_annotations, server_annotations, last_sync_annotations)
4747
local merged = {}
4848

4949
-- Convert lists into tables indexed by the unique key
5050
local local_map = convert_to_map(local_annotations)
5151
local server_map = convert_to_map(server_annotations)
5252
local last_sync_map = convert_to_map(last_sync_annotations)
53-
-- salt.save(server_map,SidecarDir .. "/anotation-server.lua")
53+
-- salt.save(server_map,SidecarDir .. "/anotation-server.lua"):
5454
-- salt.save(local_map, SidecarDir .. "/anotation-local.lua")
5555
-- salt.save(last_sync_map, SidecarDir .. "/anotation-last-sync.lua")
5656
-- Process local highlights

0 commit comments

Comments
 (0)