mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-24 03:04:51 +00:00
Make sure all "get" access to $tw.config.fileExtensionInfo goes through a $tw.utils.getFileExtensionInfo helper function that ensures the parameter is cast to lowercase. Fixes #1418.
This commit is contained in:
@@ -38,7 +38,7 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
|
||||
},
|
||||
loadTiddlersFromFile = function(sourcePath,prefix) {
|
||||
var ext = path.extname(sourcePath),
|
||||
extensionInfo = $tw.config.fileExtensionInfo[ext],
|
||||
extensionInfo = $tw.utils.getFileExtensionInfo(ext),
|
||||
typeInfo = extensionInfo ? $tw.config.contentTypeInfo[extensionInfo.type] : null,
|
||||
data = fs.readFileSync(sourcePath,typeInfo ? typeInfo.encoding : "utf8"),
|
||||
fields = {title: sourcePath},
|
||||
|
||||
Reference in New Issue
Block a user