Skip to content

attr_list: add option to preserve attributes without value as-is #1501

Open
@FeldrinH

Description

@FeldrinH

Currently, if you have an attribute without value then attr_list defaults the value to the name of the attribute. For example:

[download](file.txt){download}

is rendered as

<a download="download" href="file.txt">download</a>

I would like to have an option to preserve it as simply download without value, so the output would be this:

<a download href="file.txt">download</a>

This would make the attribute list in markdown more consistent with the produced HTML.

PS: What was the reasoning behind the current behavior? I can't think of a scenario where I would want the attribute to have its name as the value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report.confirmedConfirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.someday-maybeApproved low priority request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions