From 498c8d21b28862f05e20bf282a232b7c76b064fa Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 21 Oct 2014 13:27:01 -0700 Subject: [PATCH] Fix comments n junk --- docs/advanced/scopes-and-scope-descriptors.md | 2 +- src/scope-descriptor.coffee | 3 +++ src/text-editor.coffee | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/advanced/scopes-and-scope-descriptors.md b/docs/advanced/scopes-and-scope-descriptors.md index eb5803a8a..7ee82995e 100644 --- a/docs/advanced/scopes-and-scope-descriptors.md +++ b/docs/advanced/scopes-and-scope-descriptors.md @@ -84,4 +84,4 @@ valueForLanguage = atom.config.get(editor.getRootScopeDescriptor(), 'my-package. [editor-scopeDescriptorForBufferPosition]:https://atom.io/docs/api/latest/TextEditor#instance-scopeDescriptorForBufferPosition [cursor-getScopeDescriptor]:https://atom.io/docs/api/latest/Cursor#instance-getScopeDescriptor -[scope-desctiptor]:https://atom.io/docs/api/latest/ScopeDescriptor +[scope-descriptor]:https://atom.io/docs/api/latest/ScopeDescriptor diff --git a/src/scope-descriptor.coffee b/src/scope-descriptor.coffee index 8de28a2a0..73e269de3 100644 --- a/src/scope-descriptor.coffee +++ b/src/scope-descriptor.coffee @@ -2,6 +2,9 @@ # root of the syntax tree to a token including _all_ scope names for the entire # path. # +# Methods that take a `ScopeDescriptor` will also accept an {Array} of {Strings} +# scope names e.g. `['.source.js']`. +# # You can use `ScopeDescriptor`s to get language-specific config settings via # {Config::get}. # diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 4de0be209..c0f768da0 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -487,7 +487,7 @@ class TextEditor extends Model when 'decoration-updated' deprecate("Use Decoration::onDidChangeProperties instead. You will get the decoration back from `TextEditor::decorateMarker()`") when 'decoration-changed' - deprecate("Use Marker::onDidChange instead. eg. `editor::decorateMarker(...).getMarker().onDidChange()`") + deprecate("Use Marker::onDidChange instead. e.g. `editor::decorateMarker(...).getMarker().onDidChange()`") when 'screen-lines-changed' deprecate("Use TextEditor::onDidChange instead") @@ -1216,7 +1216,7 @@ class TextEditor extends Model # ## Arguments # # * `marker` A {Marker} you want this decoration to follow. - # * `decorationParams` An {Object} representing the decoration eg. `{type: 'gutter', class: 'linter-error'}` + # * `decorationParams` An {Object} representing the decoration e.g. `{type: 'gutter', class: 'linter-error'}` # * `type` There are a few supported decoration types: `gutter`, `line`, and `highlight` # * `class` This CSS class will be applied to the decorated line number, # line, or highlight. @@ -2371,7 +2371,7 @@ class TextEditor extends Model ### # Essential: Returns a {ScopeDescriptor} that includes this editor's language. - # eg. `['.source.ruby']`, or `['.source.coffee']`. You can use this with + # e.g. `['.source.ruby']`, or `['.source.coffee']`. You can use this with # {Config::get} to get language specific config values. getRootScopeDescriptor: -> @displayBuffer.getRootScopeDescriptor() @@ -2398,7 +2398,7 @@ class TextEditor extends Model # For example, if you wanted to find the string surrounding the cursor, you # could call `editor.bufferRangeForScopeAtCursor(".string.quoted")`. # - # * `scopeSelector` {String} selector. eg. `'.source.ruby'` + # * `scopeSelector` {String} selector. e.g. `'.source.ruby'` # # Returns a {Range}. bufferRangeForScopeAtCursor: (scopeSelector) ->