Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tags with additional attributes are converted to markdown #28

Open
notslang opened this issue Apr 19, 2016 · 3 comments
Open

tags with additional attributes are converted to markdown #28

notslang opened this issue Apr 19, 2016 · 3 comments

Comments

@notslang
Copy link
Owner

moved from notslang/atom-tidy-markdown#44 by @Superbest

I noticed that <img> tags seem to be corrected too aggressively.

I have several files where I include images with something like <img src="my image.png" width=500> because the image itself is too large for a nice layout. Tidy Markdown converts these into ![](my image.png). This strips the width information, and disrupts layout.

Possible solutions (pick one:

  • Leave HTML tags alone and don't tidy them at all.
  • Don't tidy <img> tags.
  • Check the tag and only tidy if there are no properties besides src.
  • Make HTML tag tidying optional behavior.
@notslang
Copy link
Owner Author

I think that adding an option like --no-aggressive-html-conversion (or a better name if someone can come up with one) would be a good idea... That option would make sure that any HTML which cannot be fully represented by Markdown isn't converted.

However, I think that, by default, we should strip attributes like that... It's quite useful when taking a webpage and rewriting it in Markdown and usually attributes like width should be handled by CSS.

@arranf
Copy link

arranf commented Apr 23, 2016

I just want to throw in I think the default should be the other way around. Your average user isn't expecting to encounter reduced markdown when they use the plugin but someone who's transforming pages from HTML to MD is likely to investigate further.

@notslang notslang changed the title img tags with additional attributes are converted to markdown tags with additional attributes are converted to markdown May 27, 2016
@matthewfeickert
Copy link

So was there any resolution on this, or is this still an issue that someone has yet to take on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants