-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#! format off does not completely disable formatting #107
Comments
Not sure I would call it a bug, but perhaps a result of how things are implemented. For the "add explicit return" formatting pass the syntax node of interest is the #! format: off
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
#! format: on would work as you expect. |
Ok, so let us see if this will be changed in Pluto then. |
Will be addressed in Pluto: fonsp/Pluto.jl#3106 (comment) |
Hi, thanks for runic! I am in the process of being persuaded to agree that explicit return statements are a good thing for those reading my code. However:
Every time Pluto saves a notebook to disk, it writes the following statement to the notebook:
Runic wants to format this as
While this might be changed to more "runic" code on the Pluto side (@fonsp),
in fact, runic fails the assumption that code in the region marked by
formt on/off
is not modified. So I guess this is a bug.The text was updated successfully, but these errors were encountered: