#microformats 2024-03-11

2024-03-11 UTC
jacky, [Joe_Crawford], gRegor, barnaby, [aciccarello], angelo, [lcs], [qubyte], lazcorp, [Scout], [jacky] and [snarfed] joined the channel
#
jacky
https://github.com/microformats/tests/blob/458c4c9ddf7321f6c02fd1db85622c26d3215ce9/tests/microformats-v2/h-adr/lettercase.html this test is a little confusing for me. are we checking that any item whose letter casing is off should be rejected? is the sole mf2 item in the adjacent JSON file meant to match _every_ item?
#
jkingweb
Class names are case-sensitive. Only the first HTML structure actually yields a microformat.
#
jkingweb
Or perhaps I should say, microformat classes are always lowercase. Anything with an uppercase letter is therefore not relevant to parsing.
#
jacky
_hm_ okay that's a great catch
#
jacky
I adjusted the parser to accept any casing, I don't remember (or most likely scanned mad quick past) this part of the parsing flow
#
jacky
ah I see: "The "*" for root (and property) class names consists of an optional vendor prefix (series of 1+ number or lowercase a-z characters i.e. [0-9a-z]+, followed by '-'), then one or more '-' separated lowercase a-z words."
#
jacky
the parser has a hard failure when it comes across a property declaration when no item has been declared yet. going to flip this to a warning (one of the first lints I can make with this!)
#
jkingweb
Oh, that's something I should add to my tests.
[tantek] joined the channel
#
jacky
I think having that could help people catch that bug (a very very long term goal is to have some kind of thing that can find common mf2 bugs in HTML and help fix it)
#
jacky
that's something i'd want to have as I'm working on a theme versus having to eyeball it each time
#
jacky
I'd also imagine that would help adoption if there's a tool to help nudge towards valid mf2 (linters have helped me with this in general and good compiler errors - which are hard)
#
[KevinMarks]
The parser did originally allow all casing, but we tightened it up once we found a lot of false positives in the wild (initially a lot of `u-*`)
lazcorp joined the channel
#
lazcorp
Thinking of adding microformats to my artwork pages. Would a piece of artwork (in a gallerym with a date attrahed to each piece of artwork) count as an "h-entry"?
#
lazcorp
*date attrahed to each piece of artwork
#
lazcorp
*date attached to each piece of artwork
#
lazcorp
Or I guess I could use h-product
#
jacky
h-entry's good to start with to be safe tbh!
#
jacky
esp because things like `u-photo` already have context for showing photos in /readers
#
lazcorp
thanks, jacky
#
lazcorp
jacky ++
#
Loqi
jacky has 5 karma in this channel over the last year (43 in all channels)
jacky and lazcorp joined the channel
#
lazcorp
Yes, that seems to have worked
[daveletorey] and [contact898] joined the channel
#
[snarfed]
fun mf2 debugging of the day: this mf2 html content contains an >500KB image inlined in a data: URL , https://pin13.net/mf2/?url=https://maurice-renck.de/de/blog/2023/kw52 😕
#
Loqi
[preview] [Maurice Renck] 31.12.2023 Wochenrückblick Maurice Renck Wochenrückblick 52 ...
#
jacky
oh _dang_ that is something to keep in mind
#
jacky
is tempted to add this to the MF2 test repo
[jeremycherfas] joined the channel
#
gRegor
Is there something specific about it with innerHTML that parsers might mess up? https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
[chrisaldrich], barnaby, [KevinMarks] and barnabywalters joined the channel
#
[KevinMarks]
An early version of Quill did the data url thing for images (it might still do if you don't have a media endpoint)
#
jacky
it does (that's how I get images to my site)
[benatwork] joined the channel
#
[snarfed]
gRegor not that I know of, the size was just painful and hit an internal limit
[Tilley], barnaby, [Ana_R], vete, [manton], angelo_ and jacky joined the channel