Skip to content

Commit 84b675a

Browse files
add file reference
1 parent abde97b commit 84b675a

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

doc_join.lua

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ function add_file(table,filepath)
33
local path = dtw.newPath(filepath)
44
local extension = path.get_extension()
55
print("Joining file: " .. filepath, " with extension: " .. extension)
6-
local content = ""
7-
if extension ~= "md" then
6+
local content = "- file:".. filepath .. "\n"
87
content = "~~~" .. extension .. "\n"
9-
end
10-
content = content .. dtw.load_file(filepath)
11-
if extension ~= "md" then
8+
9+
content = content .. dtw.load_file(filepath)
1210
content = content .. "\n~~~\n"
13-
end
11+
1412
table[#table + 1] = content
1513
end
1614

0 commit comments

Comments
 (0)