Emphasis icon indicating copy to clipboard operation
Emphasis copied to clipboard

Unable to deep link to ordered/unordered lists

Open joeybaker opened this issue 13 years ago • 7 comments

The handy paragraph symbol doesn't appear next to ol or ul. It also doesn't seem possible to highlight any text that appears in lists.

joeybaker avatar Jan 23 '11 19:01 joeybaker

That's customizable by making a copy of the script and editing the this.paraSelctors definition on line 48 of emphasis-src.js.

But the primary version should probably be extended to allow highlighting and linking to lists and other non-paragraph elements.

dgw avatar Jan 28 '11 00:01 dgw

Yes and No. Lists are not Paragraphs, therefore no "P" symbol as thats not technically correct. I originally debated whether to include OL and UL (and also Header tags) but decided not too for simplicities sake. I'm not opposed to re-visiting that if enough people make a case for it.

donohoe avatar Jan 03 '12 19:01 donohoe

I recognize that the ¶ symbol isn't technically correct for lists, but I'd think that list items are a pretty popular thing that people might want to link to, no?

joeybaker avatar Jan 05 '12 02:01 joeybaker

I agree however list items are not always text and this was primarily focused on just text. Often lists are of links, images and other items. I'm not sure how easy it would be to add UL and OL but I will look into it (or you could fork the project and do so...).

donohoe avatar Jan 05 '12 19:01 donohoe

Ah, yes! Hadn't considered non-text lists. That's a good point. I'll give it some thought. Perhaps it should only apply to lists wrapped in a <p>?

joeybaker avatar Jan 05 '12 20:01 joeybaker

Yes, you could do that - but - P tags cannot contain block-level elements - which covers UL and OL

http://htmlhelp.com/reference/html40/block/p.html

donohoe avatar Jan 06 '12 00:01 donohoe

ah! yup, right you are.

Perhaps if a list is a sibling of a <p>?

joeybaker avatar Jan 06 '12 00:01 joeybaker