Skip to content

Conversation

@tmke8
Copy link

@tmke8 tmke8 commented Dec 15, 2023

As previously discussed in #185

I'm not sure what the process is for a syntax change, so I'm just starting it by adding a description to syntax.md.

If you do like this syntax, I'm guessing I would

Rendered docs:

image

@dereuromark
Copy link
Contributor

I like it. Is this repo still maintained? There wasnt any feedback so far on it.

@jgm
Copy link
Owner

jgm commented Nov 27, 2025

It's a natural idea. I just haven't had bandwidth for this recently.

dereuromark added a commit to php-collective/djot-php that referenced this pull request Nov 28, 2025
List items can now have attributes on the following line at content indent:

```djot
- item 1
  {.highlight #id1}
- item 2
  {data-value="test"}
```

Renders as:
```html
<li class="highlight" id="id1">item 1</li>
<li data-value="test">item 2</li>
```

Works with:
- Unordered lists
- Ordered lists
- Task lists

Related: jgm/djot#262

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
dereuromark added a commit to php-collective/djot-php that referenced this pull request Nov 28, 2025
List items can now have attributes on the following line at content indent:

```djot
- item 1
  {.highlight #id1}
- item 2
  {data-value="test"}
```

Renders as:
```html
<li class="highlight" id="id1">item 1</li>
<li data-value="test">item 2</li>
```

Works with:
- Unordered lists
- Ordered lists
- Task lists

Related: jgm/djot#262

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
@dereuromark
Copy link
Contributor

dereuromark commented Dec 3, 2025

The single space making the different of item vs content can be maybe for some a bit misleading.

I propose to have this appending the item:

- item 1
  {.highlight #id1}
- item 2
  {data-value="test"}

Refs demo implementation @ php-collective/djot-php#5

This would also be consistent with sub-elements in general (e.g. DL and DD):
https://github.com/php-collective/djot-php/blob/master/docs/_attribute-support.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants