You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for the detailed issue, I have merged your proposed fix.
To be honest, I have never used pandoc.list directly in the last 10 months for sure, always called pander instead which resolved this issue by analyzing the class of each part before applying any of the pandoc.* functions. E.g. (before fix):
> pander(list('one', list('two')))
* one
*
* two
<!-- end of list -->
pandoc.list
doesn't return the properly indented list if a sub-list has only one element.Example
Suppose I want to make the following list:
I'd do
However this returns
If however the sublist has more than one element, everything works fine:
Fix
I believe the error is in this line of
pandoc.list.return
.Note that in the case of the element
list('two')
,elements[i]
has length 1 but the string representation ofelements[i]
islist("two")
.If you change it to:
then all works as expected.
I am unsure if this breaks some other use case, though.
The text was updated successfully, but these errors were encountered: