jgm / djot.js

JavaScript implementation of djot
MIT License
155 stars 18 forks source link

Non-recursive implementation of filter #9

Closed jgm closed 1 year ago

jgm commented 1 year ago

The recursive call here will cause a stack overflow on deeply nested documents:

https://github.com/jgm/djot.js/blob/e1138eddcf5a741d2dcfec069c929644aa0fa167/src/filter.ts#L122-L124

Replace with a non-recursive algorithm.

jgm commented 1 year ago

Closed by 8380cd8fb7dcd22cc0dcfac9396dd87774c742aa