notion-to-md icon indicating copy to clipboard operation
notion-to-md copied to clipboard

Children blocks with custom transformers are not included in the output of blocksToMarkdown

Open andrew-polk opened this issue 10 months ago • 2 comments

This recent change broke all children with custom transformers when using blocksToMarkdown.

I understand the change was made to prevent some duplicate markdown from being created (#62), but I think a different solution is needed.

Consider the simple use case of a numbered list with sub items.

  1. One
    1. Sub one

If I call blocksToMarkdown on the first item, my numbered_list_item custom transformer used to be called for both items and both items would end up in the output.

Now, the child never makes it to the output at all.

This is true of any child with a custom transformer.

Was this an oversight? Or did you intend that if a custom transformer was used that the transformer should be responsible for handling the type and all its children? If the latter, could you provide an example of how this can most easily be accomplished?

andrew-polk avatar Aug 25 '23 21:08 andrew-polk