-
Notifications
You must be signed in to change notification settings - Fork 67
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
Remove Null? #91
Comments
I decided to wait on this until it can be packaged with other breaking API changes. Otherwise this causes too much disruption for what it gains us. |
|
@nichtich I guess there are two potentially separate issues here:
We could, in principle, ignore JSON nulls without having a Null constructor in Block (though there may be issues of detail I'm not thinking of, especially since we're using an automatically derived FromJSON instance). |
Note also that one can always write a filter that is capable of removing Blocks by making the type of the underlying transformation |
No, there is no need to have it.
They can be ignored but should be documented. Right now the JSON format is only described implicitly by Haskell types, so removal would also make existing AST structure invalid. Confusion such as #75 (table format changed two times from 1.20 to 1.21 to 1.22) and any breaking of backwards compatibility should be avoided. |
That's true, explicitly ignoring null in parsing JSON would keep a degree of backwards compatibility for JSON filters that use Null. (As long as they aren't written in Haskell using the Null constructor.) Doing this, however, might cause a lot of additional code complexity if it means not using automatic derivation of the FromJSON instance. In that case it may not be worth it -- and maybe we should just keep Null, as ugly but harmless. |
[API change] Closes jgm#91.
What is the appropriate replacement pattern for using
The solution I've come up with is to replace ::::: removeme
This should disappear
:::::
::::: keep
This should stay
::::: Div = function(el)
v,i = el.classes:find("removeme")
if i ~= nil then
return pandoc.RawBlock("text", "")
else
return el
end
end Is this correct? |
In a Lua filter you can |
We have a Block constructor Null. I think this was added before we were using Builder in the readers; I wonder if there's any reason for it to exist. Note that there's nothing like this for Inline.
The text was updated successfully, but these errors were encountered: