tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.26k stars 108 forks source link

Flags falsely on a googleAnalytics ID #583

Closed digital-shokunin closed 3 months ago

digital-shokunin commented 3 months ago

Message: "UA-37662566-1" does not match "(UA-\d{6}-\d)|(G-\w+)"Even Better TOML

My Google Anayltics ID is correct and I verified it in the portal. The rule/regex is invalid

digital-shokunin commented 3 months ago

Better regex:

(UA-\d{4,9}-\d)|(G-\w+)

GA ID's can be 4 to 9 digits before the hyphen.

JounQin commented 3 months ago

Any spec reference? And PR welcome to schemastore I think.

digital-shokunin commented 3 months ago

Weirdly Google seems to be non-specific, I got that from querying various LLMs/searches.

I was going to do a pull request but had trouble finding (even with a search) where that regex string is located.

JounQin commented 3 months ago

What file are you editing? Mostly you should PR to https://github.com/SchemaStore/schemastore/blob/77884c79a4ea1aa63dcdc60555c826cd05f83ab8/src/schemas/json/hugo.json#L722