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

Unified Diff: lib/typoFixer.js

Issue 10220011: Fixed: FQDNs were incorrectly recognized as typos (Closed)
Patch Set: Created April 16, 2013, 1:55 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/typoFixer.js
===================================================================
--- a/lib/typoFixer.js
+++ b/lib/typoFixer.js
@@ -129,6 +129,10 @@
let oldDomain = domain;
if (!isIPAddress(domain))
{
+ // Remove . at end of domain for fully qualified domain names
+ if (domain[domain.length - 1] == ".")
+ domain = domain.substr(0, domain.length - 1);
Wladimir Palant 2013/04/16 13:59:29 How about: domain = domain.replace(/\.$/, "");
+
processTypedDomain(domain);
let newDomain = getDomainCorrection(domain);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld