{"id":"card.weed.th-law-citation","title":"Gazette citation and highlight hashes","spec":"https://card.weed.th/law/citation.json","html":{"en":"https://card.weed.th/law/citation","th":"https://card.weed.th/th/law/citation"},"documents":{"en":"https://card.weed.th/law/documents/{sourceId}","th":"https://card.weed.th/th/law/documents/{sourceId}"},"officialText":"English pages are the team’s translation. The PDF linked on the document page is the official text.","scope":"How to link a gazette page and highlight a clause or a quote. Not legal rules.","grammar":"#s-{n} | #c-{n} | #q={encodeURIComponent(snippet)} | #s-{n}&q={encodeURIComponent(snippet)} | #:~:text={encoded snippet}","hash":{"section":{"pattern":"#s-{n}","digits":"Arabic 0-9 or Thai ๐-๙","highlights":"section / มาตรา n in yellow"},"clause":{"pattern":"#c-{n}","digits":"Arabic 0-9 or Thai ๐-๙","highlights":"clause / ข้อ n in yellow"},"quote":{"pattern":"#q={encodeURIComponent(snippet)}","also":"#:~:text={encoded snippet}","snippet":"A short unique prefix, about 20–80 characters. First exact match in the rendered document. If the snippet is missing, nothing else is highlighted.","prefer":"#q= so the language toggle can keep the quote. Browsers strip #:~:text= from location.hash."},"combine":"If both a clause hash and a quote are present (#s-46&q=… or #s-46:~:text=…), highlight the quote inside that section when found, otherwise the section.","languageToggle":"The language toggle keeps the full hash, including #q=."},"examples":[{"url":"https://card.weed.th/law/documents/ttm#s-46","note":"Section 46 of source ttm"},{"url":"https://card.weed.th/law/documents/herb25#c-4","note":"Clause 4 of source herb25"},{"url":"https://card.weed.th/law/documents/ttm#q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb","note":"Quote highlight on ttm"},{"url":"https://card.weed.th/law/documents/ttm#s-46&q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb","note":"Quote inside section 46, else the section"},{"url":"https://card.weed.th/law/documents/ttm#:~:text=No%20person%20may%20study%20or%20export%20a%20controlled%20herb","note":"W3C text fragment; #q= is the durable form"},{"url":"https://card.weed.th/th/law/documents/ttm#s-46","note":"Thai document page, same hash"}],"prompt":"Gazette citation hashes for card.weed.th. The URL is the API. No extra request.\nEnglish: https://card.weed.th/law/documents/{sourceId}\nThai: https://card.weed.th/th/law/documents/{sourceId}\nHash grammar:\n#s-{n} highlights section / มาตรา n (Arabic or Thai digits).\n#c-{n} highlights clause / ข้อ n.\n#q={encodeURIComponent(snippet)} highlights the first exact match of that snippet (about 20–80 characters is enough). If the snippet is missing, do not highlight anything else.\n#s-{n}&q={encodeURIComponent(snippet)} highlights the quote inside that section if found, otherwise the section. Same for #c-{n}&q=.\n#:~:text={encoded snippet} is also accepted. Prefer #q= so the language toggle can keep the quote.\nThe language toggle keeps the full hash.\nEnglish pages are the team’s translation. The PDF linked on the document page is the official text.\nExamples: https://card.weed.th/law/documents/ttm#s-46 ; https://card.weed.th/law/documents/ttm#q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb ; https://card.weed.th/law/documents/ttm#s-46&q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb\nThis spec: https://card.weed.th/law/citation.json"}