Skip to content

Commit

Permalink
doc(jsdoc): Fix JSDocs violations and typo (#463)
Browse files Browse the repository at this point in the history
* Fix typo.

* Fix JSDocs error.
  • Loading branch information
YoranBrondsema authored and bantic committed Aug 24, 2016
1 parent c9d4067 commit 843f381
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/editor/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class PostEditor {
* // section has text of "Howdy"
*
* @param {Position} position The position to delete at
* @param {direction=DIRECTION.BACKWARD} direction The direction to delete in
* @param {Direction} [direction=DIRECTION.BACKWARD] direction The direction to delete in
* @param {Object} [options]
* @param {String} [options.unit="char"] The unit of deletion ("word" or "char")
* @return {Position}
Expand Down
4 changes: 2 additions & 2 deletions src/js/parsers/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CR_LF_REGEX = new RegExp(CR+LF, 'g');

export const SECTION_BREAK = LF;

function normalizeLindEndings(text) {
function normalizeLineEndings(text) {
return text.replace(CR_LF_REGEX, LF)
.replace(CR_REGEX, LF);
}
Expand All @@ -35,7 +35,7 @@ export default class TextParser {
* @return {Post} a post abstract
*/
parse(text) {
text = normalizeLindEndings(text);
text = normalizeLineEndings(text);
text.split(SECTION_BREAK).forEach(text => {
let section = this._parseSection(text);
this._appendSection(section);
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/cursor/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Position = class Position {
/**
* Returns a range from this position to the given tail. If no explicit
* tail is given this returns a collapsed range focused on this position.
* @param {Position=this} tail The ending position
* @param {Position} [tail=this] The ending position
* @return {Range}
* @public
*/
Expand Down

0 comments on commit 843f381

Please sign in to comment.