Skip to content

Commit 843f381

Browse files
YoranBrondsemabantic
authored andcommitted
doc(jsdoc): Fix JSDocs violations and typo (#463)
* Fix typo. * Fix JSDocs error.
1 parent c9d4067 commit 843f381

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/js/editor/post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class PostEditor {
371371
* // section has text of "Howdy"
372372
*
373373
* @param {Position} position The position to delete at
374-
* @param {direction=DIRECTION.BACKWARD} direction The direction to delete in
374+
* @param {Direction} [direction=DIRECTION.BACKWARD] direction The direction to delete in
375375
* @param {Object} [options]
376376
* @param {String} [options.unit="char"] The unit of deletion ("word" or "char")
377377
* @return {Position}

src/js/parsers/text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const CR_LF_REGEX = new RegExp(CR+LF, 'g');
1616

1717
export const SECTION_BREAK = LF;
1818

19-
function normalizeLindEndings(text) {
19+
function normalizeLineEndings(text) {
2020
return text.replace(CR_LF_REGEX, LF)
2121
.replace(CR_REGEX, LF);
2222
}
@@ -35,7 +35,7 @@ export default class TextParser {
3535
* @return {Post} a post abstract
3636
*/
3737
parse(text) {
38-
text = normalizeLindEndings(text);
38+
text = normalizeLineEndings(text);
3939
text.split(SECTION_BREAK).forEach(text => {
4040
let section = this._parseSection(text);
4141
this._appendSection(section);

src/js/utils/cursor/position.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Position = class Position {
106106
/**
107107
* Returns a range from this position to the given tail. If no explicit
108108
* tail is given this returns a collapsed range focused on this position.
109-
* @param {Position=this} tail The ending position
109+
* @param {Position} [tail=this] The ending position
110110
* @return {Range}
111111
* @public
112112
*/

0 commit comments

Comments
 (0)