diff --git a/WebsiteGenerator/Generators/MarkdownProcessor.swift b/WebsiteGenerator/Generators/MarkdownProcessor.swift index 73186ba..bda9122 100644 --- a/WebsiteGenerator/Generators/MarkdownProcessor.swift +++ b/WebsiteGenerator/Generators/MarkdownProcessor.swift @@ -75,8 +75,8 @@ struct PageContentGenerator { // For images: ![left_title](file right_title) // For videos: ![option1,option2,...](file) // For svg with custom area: ![x,y,width,height](file.svg) - // For downloads: ![download](file1,text1;file2,text2, ...) - // For files: ? + // For downloads: ![download](file1, text1; file2, text2, ...) + // External pages: ![external](url1, text1; url2, text2, ...) let fileAndTitle = markdown.between("(", and: ")") let alt = markdown.between("[", and: "]").nonEmpty if alt == "download" { @@ -151,10 +151,10 @@ struct PageContentGenerator { } let parts = area.components(separatedBy: ",").map { $0.trimmed } guard parts.count == 4, - let x = Int(parts[0]), - let y = Int(parts[1]), - let width = Int(parts[2]), - let height = Int(parts[3]) else { + let x = Int(parts[0].trimmed), + let y = Int(parts[1].trimmed), + let width = Int(parts[2].trimmed), + let height = Int(parts[3].trimmed) else { log.add(warning: "Invalid area string for svg image", source: page.path) return factory.html.svgImage(file: file) }