tobie / specref

An open-source, community-maintained database of Web standards & related references.
http://www.specref.org/
Apache License 2.0
165 stars 141 forks source link

Fix PNG aliasing #759

Closed tobie closed 1 year ago

tobie commented 1 year ago

Closes #758

/cc @svgeesus

I think this is what you're asking for. Leverages an undocumented (sorry) feature to force overwrites for exactly those usecases.

tobie commented 1 year ago

Something's off unfortunately. How urgent is this?

svgeesus commented 1 year ago

No rush, I just happened to notice it in a spec today, so raised the issue before I forgot.

deniak commented 1 year ago

@tobie, I made some suggestions which I believe should work. I see specref still relies on tr.rdf which we plan to retire in the future. Indeed, tr.rdf has some limitations and doesn't show data related to the specification series. Instead, the W3C API provides more details, e.g. https://api.w3.org/specification-series/png.

That said, I'm aware upgrading specref to use the API isn't a priority but I'm just mentioning in case we can find someone to work on that.

tobie commented 1 year ago

Thanks @deniak. Your changes would be overwritten on next update, unfortunately.

deniak commented 1 year ago

Thanks @deniak. Your changes would be overwritten on next update, unfortunately.

Right, I forgot the references get automatically updated. Changing the newId for PNG in overwrites/w3c.json should do the trick I guess:

  { "id": "PNG",               "action": "renameTo", "newId": "PNG-1"},
  { "id": "PNG",               "action": "createAlias", "aliasOf": "png-3"}
tobie commented 1 year ago

Have you tried it? It wasn’t working for me yesterday.

deniak commented 1 year ago

Have you tried it? It wasn’t working for me yesterday.

I just gave it a try and it seems to work. I don't have write access to the repo, but I'm happy to open a new PR if you want.

tobie commented 1 year ago

Adding your changes here would be easier.

deniak commented 1 year ago

Adding your changes here would be easier.

Done.

tobie commented 1 year ago

Sorry, I hadn't thought this through much and didn't consider you'd have to force push to clean things up. Apologies!

deniak commented 1 year ago

no worries :)

deniak commented 1 year ago

Thanks @tobie

tobie commented 1 year ago

No, thank you!