Hi,
I am trying to add an iD to a definition list term and not having any luck. Given a list like this:
### My List
Item 1
: Something about item 1
Item 2
: Something about item 2
<a href="#item_1">Link to item 1</a>
<a href="#item_2">Link to item 2</a>
I can't figure out where to put the {:#item_1} to make "Item 1"'s resulting <dt> to have an ID. I have tried a few things:
Attempt 1:
### My List
{:#item_1)
Item 1
: Something about item 1
{:#item_1)
Item 2
: Something about item 2
<a href="#item_1">Link to item 1</a>
<a href="#item_2">Link to item 2</a>
This puts the ID only on the <dl> and not on the <dt>. Therefore the second list item doesn't get an ID at all.
Attempt 2 and 2a:
### My List
{:#item_1) Item 1
: Something about item 1
Item 2 {:#item_1)
: Something about item 2
<a href="#item_1">Link to item 1</a>
<a href="#item_2">Link to item 2</a>
This actually renders {:item_1} and {:item_2} as part of the <dt> text. Yes, the same thing happens if I have it at the beginning or the end of the line.
Attempt 3:
### My List
Item 1
{:#item_1)
: Something about item 1
Item 2
{:#item_1)
: Something about item 2
<a href="#item_1">Link to item 1</a>
<a href="#item_2">Link to item 2</a>
This short-circuits the list creation and renders the list items as paragraphs instead.
Attempt 4:
### My List
Item 1
: {:#item_1) Something about item 1
Item 2
: {:#item_1) Something about item 2
<a href="#item_1">Link to item 1</a>
<a href="#item_2">Link to item 2</a>
This is the closest to what I want, but links to the <dd> instead of to the <dt>.
Does anybody have any idea what secret sauce I may be missing?
Thanks,
Misty