fix pandoc export for subdirectories and ranges