Skip to content

Feature request: boolean inverting flag #16

Description

@kalekje

The default option allows for naked as keys which show a value as true, wonderful. I'm wondering if it's possible to allow in the opts, a way to flag setting naked as false within the key. I would propose the following:

luakeys.parse('bold, !color', {invert_flag='!'}) -> bold=true, color=false

Allowing the user to specify a prefix for a naked that sets it to false. I could see users using *-~! as potential choices, maybe a table of choices could be passed as an alternative, or string with multiple characters for options.

As more high level concept, I wonder about the idea of 'embellishments' where the existence of the flag could be used to modify the key and value to a user's custom function.

The xparse package has these so-called embellishments; https://mirror.its.dal.ca/ctan/macros/latex/contrib/l3packages/xparse.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions