ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.77k stars 197 forks source link

Images incorrectly(???) placed in figure tag #194

Open izaakm opened 11 years ago

izaakm commented 11 years ago

I'm attempting to insert an image w/ Markdown in a note, but nvAlt is producing html with the image placed inside a figure tag.

eg, the text here:

![image](http://img.gawkerassets.com/img/17l38iv7c52l1gif/original.gif)

generates the following html:

<figure>
<img src="http://img.gawkerassets.com/img/17l38iv7c52l1gif/original.gif" alt="image" />
<figcaption>image</figcaption></figure>

but I expected the following html:

<p><img src="http://img.gawkerassets.com/img/17l38iv7c52l1gif/original.gif" alt="image" /></p>

Note: If I include 1-3 spaces before the Markdown formatted text, I get the expected html output.

ttscoff commented 11 years ago

The figure/figcaption markup is HTML5 and perfectly valid. It has the same result as the old way, but is ready for new standards.

-Brett

On Aug 29, 2013, at 9:06 PM, izaakm notifications@github.com wrote:

I'm attempting to insert an image w/ Markdown in a note, but nvAlt is producing html with the image placed inside a figure tag.

eg, the text here:

image generates the following html:

image
image

but I expected the following html:

image

Note: If I include 1-3 spaces before the Markdown formatted text, I get the expected html output.

— Reply to this email directly or view it on GitHub.

izaakm commented 11 years ago

I export the pages from nvALT and on my final web page I have specific CSS for figures and then for images within figures, which is different from the CSS that I use on other images. I realize that the html might ordinarily render correctly, but the problem is that it is not the expected result. I'm not familiar with the details of the different Markdown flavors (MultiMarkdown, etc.), but I haven't had the experience of seeing images placed into figure tags by default before using nvALT.

Is this the standard, expected result for MultiMarkdown?

ttscoff commented 11 years ago

It's standard in the latest version of MultiMarkdown. I can't change it, nor do I think it's a good idea. Just add styles to your CSS to handle it in addition to old-fashioned img markup.

On Aug 30, 2013, at 5:51 AM, izaakm notifications@github.com wrote:

I export the pages from nvALT and on my final web page I have specific CSS for figures and then for images within figures, which is different from the CSS that I use on other images. I realize that the html might ordinarily render correctly, but the problem is that it is not the expected result. I'm not familiar with the details of the different Markdown flavors (MultiMarkdown, etc.), but I haven't had the experience of seeing images placed into figure tags by default before using nvALT.

— Reply to this email directly or view it on GitHub.

izaakm commented 11 years ago

I also think this behavior is a bad idea. I work in a science field, and I use figure tags in my notes for specific things (e.g., figures) and not as arbitrary, extraneous wrappers for images. Thanks for advising me on this; I'll probably look around and consider installing another version of markdown to use with nvALT and Marked. :)

On Fri, Aug 30, 2013 at 10:17 AM, Brett Terpstra notifications@github.comwrote:

It's standard in the latest version of MultiMarkdown. I can't change it, nor do I think it's a good idea. Just add styles to your CSS to handle it in addition to old-fashioned img markup.

On Aug 30, 2013, at 5:51 AM, izaakm notifications@github.com wrote:

I export the pages from nvALT and on my final web page I have specific CSS for figures and then for images within figures, which is different from the CSS that I use on other images. I realize that the html might ordinarily render correctly, but the problem is that it is not the expected result. I'm not familiar with the details of the different Markdown flavors (MultiMarkdown, etc.), but I haven't had the experience of seeing images placed into figure tags by default before using nvALT.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ttscoff/nv/issues/194#issuecomment-23563973 .

ttscoff commented 11 years ago

From the HTML5 spec.

The HTML <figure> tag is used for annotating illustrations, diagrams, photos, code listings, etc.

You can use the <figure> element to associate a caption together with some embedded content, such as a graphic or video.

On Aug 30, 2013, at 12:45 PM, izaakm notifications@github.com wrote:

I also think this behavior is a bad idea. I work in a science field, and I use figure tags in my notes for specific things (e.g., figures) and not as arbitrary, extraneous wrappers for images. Thanks for advising me on this; I'll probably look around and consider installing another version of markdown to use with nvALT and Marked. :)

On Fri, Aug 30, 2013 at 10:17 AM, Brett Terpstra notifications@github.comwrote:

It's standard in the latest version of MultiMarkdown. I can't change it, nor do I think it's a good idea. Just add styles to your CSS to handle it in addition to old-fashioned img markup.

On Aug 30, 2013, at 5:51 AM, izaakm notifications@github.com wrote:

I export the pages from nvALT and on my final web page I have specific CSS for figures and then for images within figures, which is different from the CSS that I use on other images. I realize that the html might ordinarily render correctly, but the problem is that it is not the expected result. I'm not familiar with the details of the different Markdown flavors (MultiMarkdown, etc.), but I haven't had the experience of seeing images placed into figure tags by default before using nvALT.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ttscoff/nv/issues/194#issuecomment-23563973 .

— Reply to this email directly or view it on GitHub.

izaakm commented 11 years ago

Thanks!

On Fri, Aug 30, 2013 at 1:49 PM, Brett Terpstra notifications@github.comwrote:

From the HTML5 spec.

The HTML

tag is used for annotating illustrations, diagrams, photos, code listings, etc.

You can use the

element to associate a caption together with some embedded content, such as a graphic or video.

On Aug 30, 2013, at 12:45 PM, izaakm notifications@github.com wrote:

I also think this behavior is a bad idea. I work in a science field, and I use figure tags in my notes for specific things (e.g., figures) and not as arbitrary, extraneous wrappers for images. Thanks for advising me on this; I'll probably look around and consider installing another version of markdown to use with nvALT and Marked. :)

On Fri, Aug 30, 2013 at 10:17 AM, Brett Terpstra notifications@github.comwrote:

It's standard in the latest version of MultiMarkdown. I can't change it, nor do I think it's a good idea. Just add styles to your CSS to handle it in addition to old-fashioned img markup.

On Aug 30, 2013, at 5:51 AM, izaakm notifications@github.com wrote:

I export the pages from nvALT and on my final web page I have specific CSS for figures and then for images within figures, which is different from the CSS that I use on other images. I realize that the html might ordinarily render correctly, but the problem is that it is not the expected result. I'm not familiar with the details of the different Markdown flavors (MultiMarkdown, etc.), but I haven't had the experience of seeing images placed into figure tags by default before using nvALT.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/ttscoff/nv/issues/194#issuecomment-23563973> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ttscoff/nv/issues/194#issuecomment-23578242 .