erixtekila / gitbook-plugin-richquotes

Gitbook plugin : Transform annoted quotes to notes
Apache License 2.0
49 stars 14 forks source link

Multi-paragraph quotes with more than one <strong> doesn't work #9

Closed alexandreaquiles closed 9 years ago

alexandreaquiles commented 10 years ago

Consider the following Markdown quote:

> **Note** First paragraph with a **bold**.
> 
> Second paragraph with a **bold**.

It renders a blockquote with two p with strong inside them.

The result is: richquotes_not_working

The problem is that when we do $this.find( "p > strong:first-child" ) it will get both p. Then, when we do $strong.text(), we'll the contents of both concatenated.

So, I changed the selection to $this.find( "p:first-child > strong:first-child" ), in order to get only the first strong of the first p in the blockquote.

The result is the following: richquotes_working