Open Gewerd-Strauss opened 9 months ago
I currently don't have the time to sift through the source code to decompile what the function is actually called before compilation makes everything a huge mess of 2-letter combinations in an attempt to find the function's actual name.
Hello there,
The plugin seems to break down if the user supplies more than one
.bib
-file via the frontmatter. Take the following example note:This will render properly:
However, if we need to hand in multiple bibs, the plugin breaks down:
When jumping to function
QL
from the error thrown - jumping toQL (plugin:obsidian-pandoc-reference-list:79:4500)
, and breaking on the 2nd return-statement of theQL
-function, I can then run some tests:As you can see, the
trim()
-function cannot handle the array-input it receives if you supply multiple paths. If I manually assign a value and test again while debugging, no issue is thrown and the path is properly trimmed.The simplest solution in prinicple is to check if
s
is an array, then iterate over its members and perform the remainder of the function as appropriate. Ifs
is not an array, the function can operate as it does right now.But then again, this is only from what I can see and consider after taking a short look at the code exposed to obsidian rn.
I have no idea how much additional code is not compliant with multiple paths, as this is the extent to which I was able to test right now. I am not well-experienced in TS&JS, only speaking from general programming- & debugging experiences here. Furthermore, I currently don't have the setup to debug this myself using source - not beyond reading the code, and that only gets you so far without a debugger.
I hope these details are sufficient. I will happily supply further details as requested.
Thank you.
Sincerely,
~Gw
Edit 28.12.2023 14:55:
I also tested whether or not quoting the paths made any difference (given they contain spaces) - it doesn't.