mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-11 00:03:48 +00:00
refactor: fold commentText variable
This commit is contained in:
parent
8ab12738cf
commit
711bf01049
@ -53,11 +53,10 @@ exports.parse = function() {
|
|||||||
// Return a node representing the comment that is not rendered
|
// Return a node representing the comment that is not rendered
|
||||||
var commentStart = this.match.index;
|
var commentStart = this.match.index;
|
||||||
var commentEnd = this.endMatch.index + this.endMatch[0].length;
|
var commentEnd = this.endMatch.index + this.endMatch[0].length;
|
||||||
var commentText = this.parser.source.slice(commentStart, commentEnd);
|
|
||||||
return [{
|
return [{
|
||||||
type: "void",
|
type: "void",
|
||||||
children: [],
|
children: [],
|
||||||
text: commentText,
|
text: this.parser.source.slice(commentStart, commentEnd),
|
||||||
start: commentStart,
|
start: commentStart,
|
||||||
end: commentEnd
|
end: commentEnd
|
||||||
}];
|
}];
|
||||||
|
@ -46,10 +46,9 @@ exports.parse = function() {
|
|||||||
// Return a node representing the inline comment
|
// Return a node representing the inline comment
|
||||||
var commentStart = this.match.index;
|
var commentStart = this.match.index;
|
||||||
var commentEnd = this.endMatch.index + this.endMatch[0].length;
|
var commentEnd = this.endMatch.index + this.endMatch[0].length;
|
||||||
var commentText = this.parser.source.slice(commentStart, commentEnd);
|
|
||||||
return [{
|
return [{
|
||||||
type: "void",
|
type: "void",
|
||||||
text: commentText,
|
text: this.parser.source.slice(commentStart, commentEnd),
|
||||||
start: commentStart,
|
start: commentStart,
|
||||||
end: commentEnd
|
end: commentEnd
|
||||||
}];
|
}];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user