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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
@jjallaire For my understanding and better knowledge for next Lua filters I'll write, Did you encounter any any issue with returning nil ?
From Pandoc Lua filter docs, returning nil means that the object should remain unchanged. It seems ok to use it this filter.
Returning div will have the same result as it is passed unchanged, I am just curious to better understand what motivated the change. Thanks!
The reason will be displayed to describe this comment to others. Learn more.
I think you are indeed correct! I had another filter where the nil yielded a problem, but only because I had a helper function that chained together a set of filters so they could operate in a single pass (so the nil return ended up getting passed to the next filter in the chain). Thanks for pointing this out -- I will update my chain implementation and I will revert this fix.
225ecb7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jjallaire For my understanding and better knowledge for next Lua filters I'll write, Did you encounter any any issue with returning
nil
?From Pandoc Lua filter docs, returning
nil
means that the object should remain unchanged. It seems ok to use it this filter.Returning
div
will have the same result as it is passed unchanged, I am just curious to better understand what motivated the change. Thanks!225ecb7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are indeed correct! I had another filter where the
nil
yielded a problem, but only because I had a helper function that chained together a set of filters so they could operate in a single pass (so thenil
return ended up getting passed to the next filter in the chain). Thanks for pointing this out -- I will update my chain implementation and I will revert this fix.