Skip to content

Commit 0c11578

Browse files
authored
only recognize magics at start of cell (fixes #888)
1 parent 45d56f3 commit 0c11578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/execute_request.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function execute_request(socket, msg)
6464
Core.eval(Main, helpmode(hcode))
6565
else
6666
#run the code!
67-
occursin(magics_regex, code) ? magics_help(code) :
67+
occursin(magics_regex, code) && match(magics_regex, code).offset == 1 ? magics_help(code) :
6868
SOFTSCOPE[] ? softscope_include_string(current_module[], code, "In[$n]") :
6969
include_string(current_module[], code, "In[$n]")
7070
end

0 commit comments

Comments
 (0)