microformats / microformats2-parsing

For collecting and handling issues with the microformats2 parsing specification: http://microformats.org/wiki/microformats2-parsing
14 stars 6 forks source link

Omit elements with role=presentation from parsed values #79

Open snarfed opened 3 weeks ago

snarfed commented 3 weeks ago

Right now, we evidently don't have a way to exclude individual elements inside p-name or e-content or similar properties from contributing to their parsed text value. Image captions are an example: https://snarfed.org/2024-10-30_53932 contains an image with text caption inside e-content, and the caption is purely presentational, so ideally it would be omitted from the parsed content: https://pin13.net/mf2/?url=https://snarfed.org/2024-10-30_53932

@tantek proposes that we expand the mf2 parsing rules to exclude elements with role="presentation" from parsing. Works for me.

https://chat.indieweb.org/microformats/2024-11-01#t1730496257670000