{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/docfx/pulls/comments/217609758","pull_request_review_id":155364154,"id":217609758,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzYwOTc1OA==","diff_hunk":"@@ -1,26 +1,53 @@\n-﻿// Copyright (c) Microsoft. All rights reserved.\n+// Copyright (c) Microsoft. All rights reserved.\n // Licensed under the MIT license. See LICENSE file in the project root for full license information.\n \n using System;\n using System.Buffers;\n+using System.Collections.Generic;\n \n namespace Microsoft.Docs.Build\n {\n     internal static class Levenshtein\n     {\n         /// <summary>\n-        /// Calculate the Levenshtein Distance from src to target.\n+        /// Calculate the Levenshtein Distance from source string to target string.\n         /// </summary>\n         /// <param name=\"src\"> The source string </param>\n         /// <param name=\"target\">The target string </param>\n         /// <returns>Levenshtein Distance</returns>\n         public static int GetLevenshteinDistance(string src, string target)\n+        {\n+            int srcLength = string.IsNullOrEmpty(src) ? 0 : src.Length;\n+            int targetLength = string.IsNullOrEmpty(target) ? 0 : target.Length;\n+\n+            if (srcLength == 0)\n+            {\n+                return targetLength;\n+            }\n+            if (targetLength == 0)\n+            {\n+                return srcLength;\n+            }\n+            var srcCharArray = src.ToCharArray();\n+            var targetCharArray = target.ToCharArray();\n+            return GetLevenshteinDistance<char>(srcCharArray, targetCharArray, Comparer<char>.Default);\n+        }\n+\n+        /// <summary>\n+        /// Get levenshtein distance of two generic type list.\n+        /// </summary>\n+        /// <typeparam name=\"T\"> Generic type, e.g. string</typeparam>\n+        /// <param name=\"src\">The source type list</param>\n+        /// <param name=\"target\">The target type list</param>\n+        /// <param name=\"comparer\">Implementation of IEqualityComparer for given type</param>\n+        /// <returns>Levenshtein distance of the two given list</returns>\n+        public static int GetLevenshteinDistance<T>(IList<T> src, IList<T> target, IComparer<T> comparer)","path":"src/docfx/lib/Levenshtein.cs","position":46,"original_position":46,"commit_id":"93e52ff3f21971bf4a1456266017267edfa9285a","original_commit_id":"1c7f4502c5f6955933c353c94d664e4d2410ac70","user":{"login":"mingwli","id":42199316,"node_id":"MDQ6VXNlcjQyMTk5MzE2","avatar_url":"https://avatars0.githubusercontent.com/u/42199316?v=4","gravatar_id":"","url":"https://api.github.com/users/mingwli","html_url":"https://github.com/mingwli","followers_url":"https://api.github.com/users/mingwli/followers","following_url":"https://api.github.com/users/mingwli/following{/other_user}","gists_url":"https://api.github.com/users/mingwli/gists{/gist_id}","starred_url":"https://api.github.com/users/mingwli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingwli/subscriptions","organizations_url":"https://api.github.com/users/mingwli/orgs","repos_url":"https://api.github.com/users/mingwli/repos","events_url":"https://api.github.com/users/mingwli/events{/privacy}","received_events_url":"https://api.github.com/users/mingwli/received_events","type":"User","site_admin":false},"body":"maybe a list of integers? but there's no such use case yet.","created_at":"2018-09-14T06:16:56Z","updated_at":"2018-09-14T06:16:56Z","html_url":"https://github.com/dotnet/docfx/pull/3423#discussion_r217609758","pull_request_url":"https://api.github.com/repos/dotnet/docfx/pulls/3423","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/comments/217609758"},"html":{"href":"https://github.com/dotnet/docfx/pull/3423#discussion_r217609758"},"pull_request":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/3423"}},"in_reply_to_id":217608245},"pull_request":{"url":"https://api.github.com/repos/dotnet/docfx/pulls/3423","id":215488666,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NDg4NjY2","html_url":"https://github.com/dotnet/docfx/pull/3423","diff_url":"https://github.com/dotnet/docfx/pull/3423.diff","patch_url":"https://github.com/dotnet/docfx/pull/3423.patch","issue_url":"https://api.github.com/repos/dotnet/docfx/issues/3423","number":3423,"state":"open","locked":false,"title":"Bookmark validation suggestion","user":{"login":"mingwli","id":42199316,"node_id":"MDQ6VXNlcjQyMTk5MzE2","avatar_url":"https://avatars0.githubusercontent.com/u/42199316?v=4","gravatar_id":"","url":"https://api.github.com/users/mingwli","html_url":"https://github.com/mingwli","followers_url":"https://api.github.com/users/mingwli/followers","following_url":"https://api.github.com/users/mingwli/following{/other_user}","gists_url":"https://api.github.com/users/mingwli/gists{/gist_id}","starred_url":"https://api.github.com/users/mingwli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingwli/subscriptions","organizations_url":"https://api.github.com/users/mingwli/orgs","repos_url":"https://api.github.com/users/mingwli/repos","events_url":"https://api.github.com/users/mingwli/events{/privacy}","received_events_url":"https://api.github.com/users/mingwli/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-14T05:58:04Z","updated_at":"2018-09-14T06:16:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70e18689633ab4133acbd669b95669e97c8deae9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"herohua","id":2174068,"node_id":"MDQ6VXNlcjIxNzQwNjg=","avatar_url":"https://avatars3.githubusercontent.com/u/2174068?v=4","gravatar_id":"","url":"https://api.github.com/users/herohua","html_url":"https://github.com/herohua","followers_url":"https://api.github.com/users/herohua/followers","following_url":"https://api.github.com/users/herohua/following{/other_user}","gists_url":"https://api.github.com/users/herohua/gists{/gist_id}","starred_url":"https://api.github.com/users/herohua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herohua/subscriptions","organizations_url":"https://api.github.com/users/herohua/orgs","repos_url":"https://api.github.com/users/herohua/repos","events_url":"https://api.github.com/users/herohua/events{/privacy}","received_events_url":"https://api.github.com/users/herohua/received_events","type":"User","site_admin":false},{"login":"superyyrrzz","id":3831744,"node_id":"MDQ6VXNlcjM4MzE3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3831744?v=4","gravatar_id":"","url":"https://api.github.com/users/superyyrrzz","html_url":"https://github.com/superyyrrzz","followers_url":"https://api.github.com/users/superyyrrzz/followers","following_url":"https://api.github.com/users/superyyrrzz/following{/other_user}","gists_url":"https://api.github.com/users/superyyrrzz/gists{/gist_id}","starred_url":"https://api.github.com/users/superyyrrzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superyyrrzz/subscriptions","organizations_url":"https://api.github.com/users/superyyrrzz/orgs","repos_url":"https://api.github.com/users/superyyrrzz/repos","events_url":"https://api.github.com/users/superyyrrzz/events{/privacy}","received_events_url":"https://api.github.com/users/superyyrrzz/received_events","type":"User","site_admin":false},{"login":"live1206","id":5196139,"node_id":"MDQ6VXNlcjUxOTYxMzk=","avatar_url":"https://avatars0.githubusercontent.com/u/5196139?v=4","gravatar_id":"","url":"https://api.github.com/users/live1206","html_url":"https://github.com/live1206","followers_url":"https://api.github.com/users/live1206/followers","following_url":"https://api.github.com/users/live1206/following{/other_user}","gists_url":"https://api.github.com/users/live1206/gists{/gist_id}","starred_url":"https://api.github.com/users/live1206/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/live1206/subscriptions","organizations_url":"https://api.github.com/users/live1206/orgs","repos_url":"https://api.github.com/users/live1206/repos","events_url":"https://api.github.com/users/live1206/events{/privacy}","received_events_url":"https://api.github.com/users/live1206/received_events","type":"User","site_admin":false},{"login":"928PJY","id":17958546,"node_id":"MDQ6VXNlcjE3OTU4NTQ2","avatar_url":"https://avatars1.githubusercontent.com/u/17958546?v=4","gravatar_id":"","url":"https://api.github.com/users/928PJY","html_url":"https://github.com/928PJY","followers_url":"https://api.github.com/users/928PJY/followers","following_url":"https://api.github.com/users/928PJY/following{/other_user}","gists_url":"https://api.github.com/users/928PJY/gists{/gist_id}","starred_url":"https://api.github.com/users/928PJY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/928PJY/subscriptions","organizations_url":"https://api.github.com/users/928PJY/orgs","repos_url":"https://api.github.com/users/928PJY/repos","events_url":"https://api.github.com/users/928PJY/events{/privacy}","received_events_url":"https://api.github.com/users/928PJY/received_events","type":"User","site_admin":false},{"login":"OsmondJiang","id":19990166,"node_id":"MDQ6VXNlcjE5OTkwMTY2","avatar_url":"https://avatars2.githubusercontent.com/u/19990166?v=4","gravatar_id":"","url":"https://api.github.com/users/OsmondJiang","html_url":"https://github.com/OsmondJiang","followers_url":"https://api.github.com/users/OsmondJiang/followers","following_url":"https://api.github.com/users/OsmondJiang/following{/other_user}","gists_url":"https://api.github.com/users/OsmondJiang/gists{/gist_id}","starred_url":"https://api.github.com/users/OsmondJiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OsmondJiang/subscriptions","organizations_url":"https://api.github.com/users/OsmondJiang/orgs","repos_url":"https://api.github.com/users/OsmondJiang/repos","events_url":"https://api.github.com/users/OsmondJiang/events{/privacy}","received_events_url":"https://api.github.com/users/OsmondJiang/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/docfx/pulls/3423/commits","review_comments_url":"https://api.github.com/repos/dotnet/docfx/pulls/3423/comments","review_comment_url":"https://api.github.com/repos/dotnet/docfx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/docfx/issues/3423/comments","statuses_url":"https://api.github.com/repos/dotnet/docfx/statuses/93e52ff3f21971bf4a1456266017267edfa9285a","head":{"label":"mingwli:bookmark-validation-suggestion","ref":"bookmark-validation-suggestion","sha":"93e52ff3f21971bf4a1456266017267edfa9285a","user":{"login":"mingwli","id":42199316,"node_id":"MDQ6VXNlcjQyMTk5MzE2","avatar_url":"https://avatars0.githubusercontent.com/u/42199316?v=4","gravatar_id":"","url":"https://api.github.com/users/mingwli","html_url":"https://github.com/mingwli","followers_url":"https://api.github.com/users/mingwli/followers","following_url":"https://api.github.com/users/mingwli/following{/other_user}","gists_url":"https://api.github.com/users/mingwli/gists{/gist_id}","starred_url":"https://api.github.com/users/mingwli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingwli/subscriptions","organizations_url":"https://api.github.com/users/mingwli/orgs","repos_url":"https://api.github.com/users/mingwli/repos","events_url":"https://api.github.com/users/mingwli/events{/privacy}","received_events_url":"https://api.github.com/users/mingwli/received_events","type":"User","site_admin":false},"repo":{"id":144535080,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ1MzUwODA=","name":"docfx","full_name":"mingwli/docfx","owner":{"login":"mingwli","id":42199316,"node_id":"MDQ6VXNlcjQyMTk5MzE2","avatar_url":"https://avatars0.githubusercontent.com/u/42199316?v=4","gravatar_id":"","url":"https://api.github.com/users/mingwli","html_url":"https://github.com/mingwli","followers_url":"https://api.github.com/users/mingwli/followers","following_url":"https://api.github.com/users/mingwli/following{/other_user}","gists_url":"https://api.github.com/users/mingwli/gists{/gist_id}","starred_url":"https://api.github.com/users/mingwli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingwli/subscriptions","organizations_url":"https://api.github.com/users/mingwli/orgs","repos_url":"https://api.github.com/users/mingwli/repos","events_url":"https://api.github.com/users/mingwli/events{/privacy}","received_events_url":"https://api.github.com/users/mingwli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mingwli/docfx","description":"Tools for building and publishing API documentation for .NET projects","fork":true,"url":"https://api.github.com/repos/mingwli/docfx","forks_url":"https://api.github.com/repos/mingwli/docfx/forks","keys_url":"https://api.github.com/repos/mingwli/docfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mingwli/docfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mingwli/docfx/teams","hooks_url":"https://api.github.com/repos/mingwli/docfx/hooks","issue_events_url":"https://api.github.com/repos/mingwli/docfx/issues/events{/number}","events_url":"https://api.github.com/repos/mingwli/docfx/events","assignees_url":"https://api.github.com/repos/mingwli/docfx/assignees{/user}","branches_url":"https://api.github.com/repos/mingwli/docfx/branches{/branch}","tags_url":"https://api.github.com/repos/mingwli/docfx/tags","blobs_url":"https://api.github.com/repos/mingwli/docfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mingwli/docfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mingwli/docfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mingwli/docfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mingwli/docfx/statuses/{sha}","languages_url":"https://api.github.com/repos/mingwli/docfx/languages","stargazers_url":"https://api.github.com/repos/mingwli/docfx/stargazers","contributors_url":"https://api.github.com/repos/mingwli/docfx/contributors","subscribers_url":"https://api.github.com/repos/mingwli/docfx/subscribers","subscription_url":"https://api.github.com/repos/mingwli/docfx/subscription","commits_url":"https://api.github.com/repos/mingwli/docfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mingwli/docfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mingwli/docfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mingwli/docfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mingwli/docfx/contents/{+path}","compare_url":"https://api.github.com/repos/mingwli/docfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mingwli/docfx/merges","archive_url":"https://api.github.com/repos/mingwli/docfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mingwli/docfx/downloads","issues_url":"https://api.github.com/repos/mingwli/docfx/issues{/number}","pulls_url":"https://api.github.com/repos/mingwli/docfx/pulls{/number}","milestones_url":"https://api.github.com/repos/mingwli/docfx/milestones{/number}","notifications_url":"https://api.github.com/repos/mingwli/docfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mingwli/docfx/labels{/name}","releases_url":"https://api.github.com/repos/mingwli/docfx/releases{/id}","deployments_url":"https://api.github.com/repos/mingwli/docfx/deployments","created_at":"2018-08-13T05:52:13Z","updated_at":"2018-08-13T05:52:19Z","pushed_at":"2018-09-14T06:06:22Z","git_url":"git://github.com/mingwli/docfx.git","ssh_url":"git@github.com:mingwli/docfx.git","clone_url":"https://github.com/mingwli/docfx.git","svn_url":"https://github.com/mingwli/docfx","homepage":"http://dotnet.github.io/docfx/","size":334915,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"dotnet:v3","ref":"v3","sha":"96b2e24cb1e0dc6f157c39b98205ed7c4e567c55","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":38007053,"node_id":"MDEwOlJlcG9zaXRvcnkzODAwNzA1Mw==","name":"docfx","full_name":"dotnet/docfx","owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/docfx","description":"Tools for building and publishing API documentation for .NET projects","fork":false,"url":"https://api.github.com/repos/dotnet/docfx","forks_url":"https://api.github.com/repos/dotnet/docfx/forks","keys_url":"https://api.github.com/repos/dotnet/docfx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/docfx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/docfx/teams","hooks_url":"https://api.github.com/repos/dotnet/docfx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/docfx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/docfx/events","assignees_url":"https://api.github.com/repos/dotnet/docfx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/docfx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/docfx/tags","blobs_url":"https://api.github.com/repos/dotnet/docfx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/docfx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/docfx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/docfx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/docfx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/docfx/languages","stargazers_url":"https://api.github.com/repos/dotnet/docfx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/docfx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/docfx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/docfx/subscription","commits_url":"https://api.github.com/repos/dotnet/docfx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/docfx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/docfx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/docfx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/docfx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/docfx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/docfx/merges","archive_url":"https://api.github.com/repos/dotnet/docfx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/docfx/downloads","issues_url":"https://api.github.com/repos/dotnet/docfx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/docfx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/docfx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/docfx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/docfx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/docfx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/docfx/deployments","created_at":"2015-06-24T19:43:53Z","updated_at":"2018-09-13T18:04:43Z","pushed_at":"2018-09-14T06:06:24Z","git_url":"git://github.com/dotnet/docfx.git","ssh_url":"git@github.com:dotnet/docfx.git","clone_url":"https://github.com/dotnet/docfx.git","svn_url":"https://github.com/dotnet/docfx","homepage":"https://dotnet.github.io/docfx/","size":336212,"stargazers_count":1310,"watchers_count":1310,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":359,"mirror_url":null,"archived":false,"open_issues_count":300,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":359,"open_issues":300,"watchers":1310,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/3423"},"html":{"href":"https://github.com/dotnet/docfx/pull/3423"},"issue":{"href":"https://api.github.com/repos/dotnet/docfx/issues/3423"},"comments":{"href":"https://api.github.com/repos/dotnet/docfx/issues/3423/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/3423/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/docfx/pulls/3423/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/docfx/statuses/93e52ff3f21971bf4a1456266017267edfa9285a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mingwli"}}