Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: defaults/typoRules.json

Issue 8559070: Integrated URL Fixer into Adblock Plus (Closed)
Patch Set: Created Nov. 9, 2012, 3:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « defaults/prefs.js ('k') | lib/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: defaults/typoRules.json
===================================================================
new file mode 100644
--- /dev/null
+++ b/defaults/typoRules.json
@@ -0,0 +1,20 @@
+{
+ "version": 2,
+
+ "expressions": [
+ // Comma or semicolon instead of dot
+ {"find": "[,;]", "replace": "."},
+
+ // Leading or trailing dots
+ {"find": "^\\.+|\\.+$", "replace": ""},
+
+ // Only two of the three w's
+ {"find": "^w{2,4}(\\.)([^\\.]+\\..*)$", "replace": "www.$2"},
+
+ // Missing the dot
+ {"find": "([^\\.])(com|net|org|edu|mil|gov|aero|biz|coop|info|museum|name|pro|cat|jobs|mobi|travel)$", "replace": "$1.$2"}
+ ],
+
+ // Automatically generated dictionaries
+ "domain":{},"domainReferrals":{},"scheme":{}
+}
« no previous file with comments | « defaults/prefs.js ('k') | lib/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld