thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
501 stars 30 forks source link

article_selector with id #261

Closed jmn closed 9 years ago

jmn commented 9 years ago

I tried installing using carnival with "article_selector: "div#content" but this did not seem to work. Does the article selector support ID?

Example: http://www.jmnorlund.net/emacs

pbrisbin commented 9 years ago

That's strange. All we do is pass it to querySelectorAll, which I would've guessed supported something like that. I'll look into it.

pbrisbin commented 9 years ago

It is finding your article correctly. The problem is the default block_selector of :scope > p, :scope > pre is not finding any elements because your p elements are not direct children (as required by >) of the article.

First, you would need to customize the block_selector to (something like) :scope p, :scope pre. However, at that point, you will probably run into #236, which could require some more CSS on your side to work around. Very sorry about that, but at this time I don't have a good solution there.

jmn commented 9 years ago

I see. Thanks for your help!