-
Notifications
You must be signed in to change notification settings - Fork 173
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
Support for pretty="none" #326
base: master
Are you sure you want to change the base?
Support for pretty="none" #326
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to contribute. This looks like a good thing to fix, but I'm not sure this implementation is quite right. Are you still using this?
@@ -171,7 +171,6 @@ doc.ldoc = ldoc | |||
|
|||
-- if the corresponding argument was the default, then any ldoc field overrides | |||
local function override (field,defval) | |||
defval = defval or false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was to cast possible nil
values to a boolean false
. I think it was probably correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also #118.
To be honest, I've entirely swapped this out of memory, so I can't remember why the |
Can you test your usage with that line put back in? It looks right to me, and there is a big difference between |
This adds support for setting
pretty="none"
to work around #162. Doing so disables the prettifier so that it doesn't mess up the parsing of other Markdown constructs.The
defval = defval or false
part was deleted because it was preventing thepretty
value from being read fromconfig.ld
. Actually, this was a bug even before adding thenone
value: e.g. you couldn't setpretty="lxsh"
before this patch. However, it may be worth double checking if this breaks anything else, since I'm not sufficiently aware of the rest of the code base to know what else this may have interacted with.