lambdasoup icon indicating copy to clipboard operation
lambdasoup copied to clipboard

Support for comments?

Open nu-montag opened this issue 7 months ago • 1 comments

Would it be possible to add HTML5 comment support to lambdasoup? I saw this older issue that mentioned it: https://github.com/aantron/lambdasoup/issues/21#issuecomment-423634701

Ultimately this is something I'd like to see in Soupault. dmbaturin suggested I make an issue here when I asked about this on the mailing list.

If I've missed an existing method, just let me know! OCAML is new to me, so I might have overlooked something.

My understanding is that Markup.ml parses comments but they're not exposed by lambdasoup. Depending on how others use this tool, it might make sense to give people control over whether or not comments should be included in the DOM. Perhaps an option passed to Soup that defaults to "no" to maintain existing behavior?

Thanks!

nu-montag avatar May 20 '25 23:05 nu-montag

@aantron, @dmbaturin I second that. And PIs maybe as well. May change https://github.com/aantron/lambdasoup/blob/4ba3b91d/src/soup.ml#L48-L50 et al. Or add ~comment around https://github.com/aantron/lambdasoup/blob/4ba3b91d/src/soup.ml#L100?

Lambasoup is so awesome for html manipulating tools assisting editing like e.g. https://codeberg.org/mro/pagerake/issues/1, but it would be even more awesome if it could keep comments.

mro avatar Jul 31 '25 08:07 mro