-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify whitespace when replacing img with alt/src #69
Comments
Current parser support for this suggestion: php-mf2
python
go
node ruby javascript
rust
haskell
|
Live JavaScript parser is available here(note that it implements two forms of text transformation via a checkbox): |
Thanks, added those in the list |
mf2py behavior with intervening |
Re: https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property (and other places this same text appears)
Some discussion in microformats chat and microformats/mf2py#202 about whether adding whitespace should apply to only the
src
or thealt
as well. I had to re-read it a couple times, so I think we could phrase this more clearly.A strict reading does seem to indicate whitespace wrapping applies only to the
src
. As @JKingweb said:@tantek also said:
I wonder if there could be a middle ground so consumers get more useful values when alt text is replaced and there's no published whitespace between elements.
I'm leaning towards:
alt
value, add a whitespace at the beginning and end of the value and replace the image with the resultempty
alt value, remove the imagesrc
value, resolve it if it is a relative URL, add a whitespace at the beginning and end, then replace the image with the resultExample results:
non-empty alt:
empty alt:
no alt:
The text was updated successfully, but these errors were encountered: