Skip to content
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

Inline Options for Roles and Directives #28

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion meps/mep-0003.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ where `NAME`, `.CLASS`, `#ID`, and `KEY=VALUE` are unique types of attribute def
: The name of a class to annotate the AST with. This **may** be (repeatedly) defined. Each defined class will be combined into a single whitespace-separated string and passed to the role or directive as the `class` option

`#ID`
: A unique label which will be passed to the role or directive as the `label` option. This **may** be defined **once**. If it is repeated, only the final label will be used and a warning will be raised.
: A unique label which will be passed to the role or directive as the `label` option. This **may** be defined **once**. If it is repeated, only the final label will be used and a warning will be raised. Given that `ID` **must** confirm to the `VALUE-LITERAL` pseudo-grammar in order to parse correctly, users wishing to specify more complex identifiers should pass in the `name` or `label` option explicitly as a [key-value pair](#key-value).
agoose77 marked this conversation as resolved.
Show resolved Hide resolved

(key-value)=
`KEY=VALUE-LITERAL` or `KEY="RAW VALUE"`
: A key-value pair to set as named options. A `KEY` **must** be defined **once** if the role definition marks the it as required, otherwise these **may** be defined **once**. Quotes are not needed when the `VALUE` consists entirely of ASCII alphanumeric characters or `_` or `:` or `-`. Backslash escapes may be used inside quoted values. These values are parsed according to the directive options (e.g. string, markup, number, etc.)

Expand Down