User:Slaporte/WikifyCiteTool

The Wikify Cite Tool puts brackets (like ) around text that looks like a legal citation, turning the citation into a link to the cited source. Hopefully this tool will save some time and make legal sources more interconnected.

The tool is running at http://thjnk.com/tools/wikify.html, and the source is available below.

Recent updates

 * 7/8/2010 - Added some more citations; wikifies citation with "§§" (see known issue below)
 * 6/9/2010 - Fixed a bug in short form citations; added older U.S. Reports citations that include the name of the reporter (e.g., ).
 * 6/8/2010 - Recognizes some short form citations (e.g., ) and pipes the link to the full case citation (e.g.,  ).

Todo/known issues

 * If there is a double section symbol ("§§"), it still wikifies the citation. Example:  should result in   to preserve textual integrity and still minimize the number of redirects needed. Workaround: uncomment   on line 133. I'm not worrying about this too much until there is consensus on how state statute compilations will be structured.
 * Does not fully/properly handle California, New York, and Texas statutes.
 * Does not recognize or link any "Id." citations.
 * Does not link full case name, only citation.
 * Much state law is still untested.
 * Does not recognize non-standard (or no longer standard) citation formats

Source

 * wikifycite.php
 * wikify.html
 * jquery.js