Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
add file.codeData to extract user code #23
Conversation
| @@ -15,4 +15,6 @@ ${comment.line} Testcase Example: ${testcase} | |||
| ${comment.line} | |||
| {{ desc.forEach(function(x) { }}${comment.line} ${x} | |||
| {{ }) }}${comment.end} | |||
| ${comment.singleLine} @lc code=start | |||
jdneo
Sep 16, 2019
•
I'm thinking that adding a single empty line between the block comments and the single line comments. Because in some of the languages the comments styles are different.
Besides they belongs to different section.
What do you think?
I'm thinking that adding a single empty line between the block comments and the single line comments. Because in some of the languages the comments styles are different.
Besides they belongs to different section.
What do you think?
magic-akari
Sep 16, 2019
Author
Yes, adding a single empty line is better.
Yes, adding a single empty line is better.
| const end = lines.findIndex(x => x.indexOf('@lc code=end') !== -1); | ||
|
|
||
| if (start !== -1 && end !== -1 && start + 1 <= end) { | ||
| return lines.slice(start + 1, end).join(this.isWindows() ? '\r\n' : '\n'); |
jdneo
Sep 16, 2019
this.isWindows() ? '\r\n' : '\n'
Use os.EOL instead.
this.isWindows() ? '\r\n' : '\n'
Use os.EOL instead.
magic-akari
Sep 16, 2019
Author
done
done
|
Thanks @magic-akari ! |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

LeetCode-OpenSource/vscode-leetcode#418