Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit a09ee52

Browse files
committed
Fix new line detection for shebang on Windows
1 parent a79ea58 commit a09ee52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/jupyter/kernel/evaluator/ScijavaEvaluator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ private void addLanguage(String languageName) {
152152
}
153153

154154
private String setLanguage(String code) {
155+
155156
if (code.startsWith("#!")) {
156-
this.languageName = code.substring(2, code.indexOf(System.getProperty("line.separator"))).trim();
157+
this.languageName = code.substring(2, code.indexOf("\n")).trim();
157158

158159
// Return the code string without the first line
159160
code = code.substring(code.indexOf(System.getProperty("line.separator")) + 1);

0 commit comments

Comments
 (0)