Skip to content

Commit

Permalink
Merge pull request #216 from michaelb/dev
Browse files Browse the repository at this point in the history
fix sniplive
  • Loading branch information
michaelb authored Mar 11, 2023
2 parents 05eb8de + 10c0977 commit 01dff2b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## 1.2.11
- fix python3_fifo issue with try/catch
- fix deno's REPL ANSI color code appearing in result
## v1.2.12
- Fix (broken) SnipLive

## v1.2.11
- Fix python3_fifo issue with try/catch
- Fix deno's REPL ANSI color code appearing in result

## v1.2.10
- Neorg support
Expand Down
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sniprun"
version = "1.2.11"
version = "1.2.12"
authors = ["michaelb <[email protected]>"]
rust-version="1.55"
edition = "2018"
Expand Down
8 changes: 4 additions & 4 deletions lua/sniprun/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function M.run_range(range_start, range_end, filetype, config)
local override = {}
override.filetype = filetype
local lconfig = config or sniprun.config_values
lconfig["sniprun_root_dir"] = M.config.sniprun_path
lconfig["sniprun_root_dir"] = sniprun.config_values.sniprun_path
sniprun.notify('run', range_start, range_end, lconfig, "", override)
end

Expand All @@ -19,22 +19,22 @@ function M.run_string(codestring, filetype, config)
override.codestring = codestring
override.filetype = filetype or ""
local lconfig = config or sniprun.config_values
lconfig["sniprun_root_dir"] = M.config.sniprun_path
lconfig["sniprun_root_dir"] = sniprun.config_values.sniprun_path
sniprun.notify('run', 0, 0, lconfig, "", override)
end


function M.register_listener(f)
if type(f) ~= 'function' then
print("Only functions can be registered")
print("Only functions can be registered")
end
assert(type(f) == 'function')
table.insert(M.listeners, f)
end

function M.register_closer(f)
if type(f) ~= 'function' then
print("Only functions can be registered")
print("Only functions can be registered")
end
assert(type(f) == 'function')
table.insert(M.closers, f)
Expand Down

0 comments on commit 01dff2b

Please sign in to comment.