{"action":"created","comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/45627179","id":45627179,"diff_hunk":"@@ -0,0 +1,139 @@\n+/**\n+ * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.\n+ * For licensing, see LICENSE.md.\n+ */\n+\n+'use strict';\n+\n+CKEDITOR.define( [ 'ckeditorerror' ], ( CKEditorError ) => {\n+\t/**\n+\t * The transaction class groups document changes (deltas). All deltas grouped in a single transactions can be\n+\t * reverted together, so you can think about the transaction as a single undo step. If you want to extend one\n+\t * undo step you can call another method on the same transaction object. If you want to create a separate undo step\n+\t * you can create a new transaction.\n+\t *\n+\t * For example to create two separate undo steps you can call:\n+\t *\n+\t *\t  doc.makeTransaction().insert( firstPosition, 'foo' );\n+\t *\t  doc.makeTransaction().insert( secondPosition, 'bar' );\n+\t *\n+\t * To create a single undo step:\n+\t *\n+\t *\t  const transaction = doc.makeTransaction()\n+\t *\t  transaction.insert( firstPosition, 'foo' );\n+\t *\t  transaction.insert( secontPosition, 'bar' );\n+\t *\n+\t * Note that all document modification methods (insert, remove, split, etc.) are chainable so you can shorten code to:\n+\t *\n+\t *\t  doc.makeTransaction().insert( firstPosition, 'foo' ).insert( secontPosition, 'bar' );\n+\t *\n+\t * @class document.Transaction\n+\t */\n+\tclass Transaction {\n+\t\t/**\n+\t\t * Creates transaction instance. Not recommended to use directly, use {@link document.Document#makeTransaction}\n+\t\t * instead.\n+\t\t *\n+\t\t * @constructor\n+\t\t * @param {document.Document} doc Document which this transaction changes.\n+\t\t */\n+\t\tconstructor( doc ) {\n+\t\t\t/**\n+\t\t\t * Document which this transaction changes.\n+\t\t\t *\n+\t\t\t * @readonly\n+\t\t\t * @type {document.Document}\n+\t\t\t */\n+\t\t\tthis.doc = doc;\n+\n+\t\t\t/**\n+\t\t\t * Array of deltas which compose transaction.\n+\t\t\t *\n+\t\t\t * @readonly\n+\t\t\t * @type {document.delta.Delta[]}\n+\t\t\t */\n+\t\t\tthis.deltas = [];\n+\t\t}\n+\n+\t\t/**\n+\t\t * Adds delta to the transaction instance. All modification methods (insert, remove, split, etc.) use this method\n+\t\t * to add created deltas.\n+\t\t *\n+\t\t * @param {document.delta.Delta} delta Delta to add.\n+\t\t *\n+\t\t * @return {document.delta.Delta} Added delta.\n+\t\t */\n+\t\taddDelta( delta ) {\n+\t\t\tdelta.transaction = this;\n+\t\t\tthis.deltas.push( delta );\n+\n+\t\t\treturn delta;\n+\t\t}\n+\n+\t\t/**\n+\t\t * Transaction provides iterator interface which will iterate over deltas in the transaction.\n+\t\t */\n+\t\t[ Symbol.iterator ]() {","path":"src/document/delta/transaction-base.js","position":null,"original_position":76,"commit_id":"ebb7fa82bdbd95eda6cf06276cf3d3c82cc30c7e","original_commit_id":"d9bb00a7c97fec7af40c68a331de78a9e47de97a","user":{"login":"pjasiun","id":1166967,"avatar_url":"https://avatars.githubusercontent.com/u/1166967?v=3","gravatar_id":"","url":"https://api.github.com/users/pjasiun","html_url":"https://github.com/pjasiun","followers_url":"https://api.github.com/users/pjasiun/followers","following_url":"https://api.github.com/users/pjasiun/following{/other_user}","gists_url":"https://api.github.com/users/pjasiun/gists{/gist_id}","starred_url":"https://api.github.com/users/pjasiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjasiun/subscriptions","organizations_url":"https://api.github.com/users/pjasiun/orgs","repos_url":"https://api.github.com/users/pjasiun/repos","events_url":"https://api.github.com/users/pjasiun/events{/privacy}","received_events_url":"https://api.github.com/users/pjasiun/received_events","type":"User","site_admin":false},"body":"Removed. I also removed iterator form delta, because of the same reason.","created_at":"2015-11-23T16:47:04Z","updated_at":"2015-11-23T16:47:04Z","html_url":"https://github.com/ckeditor/ckeditor5-core/pull/88#discussion_r45627179","pull_request_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments/45627179"},"html":{"href":"https://github.com/ckeditor/ckeditor5-core/pull/88#discussion_r45627179"},"pull_request":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88","id":51102803,"html_url":"https://github.com/ckeditor/ckeditor5-core/pull/88","diff_url":"https://github.com/ckeditor/ckeditor5-core/pull/88.diff","patch_url":"https://github.com/ckeditor/ckeditor5-core/pull/88.patch","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/88","number":88,"state":"open","locked":false,"title":"t/69: Transaction and deltas.","user":{"login":"pjasiun","id":1166967,"avatar_url":"https://avatars.githubusercontent.com/u/1166967?v=3","gravatar_id":"","url":"https://api.github.com/users/pjasiun","html_url":"https://github.com/pjasiun","followers_url":"https://api.github.com/users/pjasiun/followers","following_url":"https://api.github.com/users/pjasiun/following{/other_user}","gists_url":"https://api.github.com/users/pjasiun/gists{/gist_id}","starred_url":"https://api.github.com/users/pjasiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjasiun/subscriptions","organizations_url":"https://api.github.com/users/pjasiun/orgs","repos_url":"https://api.github.com/users/pjasiun/repos","events_url":"https://api.github.com/users/pjasiun/events{/privacy}","received_events_url":"https://api.github.com/users/pjasiun/received_events","type":"User","site_admin":false},"body":"Fixes #69.","created_at":"2015-11-18T15:59:20Z","updated_at":"2015-11-23T16:47:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3be8136625366ed397d7016eca2f89520b7eb0ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88/commits","review_comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88/comments","review_comment_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/88/comments","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/ebb7fa82bdbd95eda6cf06276cf3d3c82cc30c7e","head":{"label":"cksource:t/69","ref":"t/69","sha":"ebb7fa82bdbd95eda6cf06276cf3d3c82cc30c7e","user":{"login":"cksource","id":825698,"avatar_url":"https://avatars.githubusercontent.com/u/825698?v=3","gravatar_id":"","url":"https://api.github.com/users/cksource","html_url":"https://github.com/cksource","followers_url":"https://api.github.com/users/cksource/followers","following_url":"https://api.github.com/users/cksource/following{/other_user}","gists_url":"https://api.github.com/users/cksource/gists{/gist_id}","starred_url":"https://api.github.com/users/cksource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksource/subscriptions","organizations_url":"https://api.github.com/users/cksource/orgs","repos_url":"https://api.github.com/users/cksource/repos","events_url":"https://api.github.com/users/cksource/events{/privacy}","received_events_url":"https://api.github.com/users/cksource/received_events","type":"Organization","site_admin":false},"repo":{"id":29292185,"name":"ckeditor5-core","full_name":"cksource/ckeditor5-core","owner":{"login":"cksource","id":825698,"avatar_url":"https://avatars.githubusercontent.com/u/825698?v=3","gravatar_id":"","url":"https://api.github.com/users/cksource","html_url":"https://github.com/cksource","followers_url":"https://api.github.com/users/cksource/followers","following_url":"https://api.github.com/users/cksource/following{/other_user}","gists_url":"https://api.github.com/users/cksource/gists{/gist_id}","starred_url":"https://api.github.com/users/cksource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cksource/subscriptions","organizations_url":"https://api.github.com/users/cksource/orgs","repos_url":"https://api.github.com/users/cksource/repos","events_url":"https://api.github.com/users/cksource/events{/privacy}","received_events_url":"https://api.github.com/users/cksource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cksource/ckeditor5-core","description":"CKEditor 5 Core Framework.","fork":true,"url":"https://api.github.com/repos/cksource/ckeditor5-core","forks_url":"https://api.github.com/repos/cksource/ckeditor5-core/forks","keys_url":"https://api.github.com/repos/cksource/ckeditor5-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cksource/ckeditor5-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cksource/ckeditor5-core/teams","hooks_url":"https://api.github.com/repos/cksource/ckeditor5-core/hooks","issue_events_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues/events{/number}","events_url":"https://api.github.com/repos/cksource/ckeditor5-core/events","assignees_url":"https://api.github.com/repos/cksource/ckeditor5-core/assignees{/user}","branches_url":"https://api.github.com/repos/cksource/ckeditor5-core/branches{/branch}","tags_url":"https://api.github.com/repos/cksource/ckeditor5-core/tags","blobs_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cksource/ckeditor5-core/statuses/{sha}","languages_url":"https://api.github.com/repos/cksource/ckeditor5-core/languages","stargazers_url":"https://api.github.com/repos/cksource/ckeditor5-core/stargazers","contributors_url":"https://api.github.com/repos/cksource/ckeditor5-core/contributors","subscribers_url":"https://api.github.com/repos/cksource/ckeditor5-core/subscribers","subscription_url":"https://api.github.com/repos/cksource/ckeditor5-core/subscription","commits_url":"https://api.github.com/repos/cksource/ckeditor5-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cksource/ckeditor5-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cksource/ckeditor5-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cksource/ckeditor5-core/contents/{+path}","compare_url":"https://api.github.com/repos/cksource/ckeditor5-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cksource/ckeditor5-core/merges","archive_url":"https://api.github.com/repos/cksource/ckeditor5-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cksource/ckeditor5-core/downloads","issues_url":"https://api.github.com/repos/cksource/ckeditor5-core/issues{/number}","pulls_url":"https://api.github.com/repos/cksource/ckeditor5-core/pulls{/number}","milestones_url":"https://api.github.com/repos/cksource/ckeditor5-core/milestones{/number}","notifications_url":"https://api.github.com/repos/cksource/ckeditor5-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cksource/ckeditor5-core/labels{/name}","releases_url":"https://api.github.com/repos/cksource/ckeditor5-core/releases{/id}","created_at":"2015-01-15T10:25:18Z","updated_at":"2015-01-15T10:25:18Z","pushed_at":"2015-11-23T16:45:06Z","git_url":"git://github.com/cksource/ckeditor5-core.git","ssh_url":"git@github.com:cksource/ckeditor5-core.git","clone_url":"https://github.com/cksource/ckeditor5-core.git","svn_url":"https://github.com/cksource/ckeditor5-core","homepage":null,"size":639,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ckeditor:master","ref":"master","sha":"c87f70d571f8305bfd5c99adcd755d7cc4746fb0","user":{"login":"ckeditor","id":825710,"avatar_url":"https://avatars.githubusercontent.com/u/825710?v=3","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":28972890,"name":"ckeditor5-core","full_name":"ckeditor/ckeditor5-core","owner":{"login":"ckeditor","id":825710,"avatar_url":"https://avatars.githubusercontent.com/u/825710?v=3","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ckeditor/ckeditor5-core","description":"CKEditor 5 Core Framework.","fork":false,"url":"https://api.github.com/repos/ckeditor/ckeditor5-core","forks_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/forks","keys_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/teams","hooks_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/hooks","issue_events_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/events{/number}","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/events","assignees_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/assignees{/user}","branches_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/branches{/branch}","tags_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/tags","blobs_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/languages","stargazers_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/stargazers","contributors_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/contributors","subscribers_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/subscribers","subscription_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/subscription","commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/contents/{+path}","compare_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/merges","archive_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/downloads","issues_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues{/number}","pulls_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/labels{/name}","releases_url":"https://api.github.com/repos/ckeditor/ckeditor5-core/releases{/id}","created_at":"2015-01-08T15:47:45Z","updated_at":"2015-11-13T07:04:45Z","pushed_at":"2015-11-23T16:45:19Z","git_url":"git://github.com/ckeditor/ckeditor5-core.git","ssh_url":"git@github.com:ckeditor/ckeditor5-core.git","clone_url":"https://github.com/ckeditor/ckeditor5-core.git","svn_url":"https://github.com/ckeditor/ckeditor5-core","homepage":null,"size":586,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":34,"forks":13,"open_issues":34,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88"},"html":{"href":"https://github.com/ckeditor/ckeditor5-core/pull/88"},"issue":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/88"},"comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/ckeditor/ckeditor5-core/statuses/ebb7fa82bdbd95eda6cf06276cf3d3c82cc30c7e"}}}}