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

Markdown support #93

Closed
Bengt opened this issue Sep 15, 2014 · 9 comments
Closed

Markdown support #93

Bengt opened this issue Sep 15, 2014 · 9 comments
Assignees
Labels

Comments

@Bengt
Copy link
Contributor

Bengt commented Sep 15, 2014

Currently Atom Beautify displays an error, when opening a markdown file:

Unsupported language for grammar 'GitHub Markdown'.

It would be nice to have Atom Beautify normalize Markdown. That could be done using pandoc as suggested in another repo:

$ pandoc -f markdown -t markdown index.md
@Glavin001 Glavin001 self-assigned this Sep 15, 2014
@Glavin001
Copy link
Owner

Thanks for posting a potential solution using pandoc. That really helps with potential features being developers, so I do not have to search around and hope it works for everyone.

This would not be very hard to do at all given we already have a cliBeautify base class and many other beautifiers that use external CLI tools.

@Bengt
Copy link
Contributor Author

Bengt commented Sep 15, 2014

You are very welcome. Let me know if there are any questions about using pandoc. Would it be preferable to read from a file rather than from stdout? That could be done by specifying one using the -o / --output flag:

$ pandoc -f markdown -t markdown -o index_new.md index.md

@Glavin001
Copy link
Owner

Reading in and out from file would be better than stdin and stdout.
Here is an example: https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/php-beautify.coffee
You could simply swap out the command from php_beautifier to pandoc and change some of the arguments and you'd be done 👍

@Bengt
Copy link
Contributor Author

Bengt commented Sep 15, 2014

OK, I will give that a shot.

@Bengt
Copy link
Contributor Author

Bengt commented Sep 15, 2014

Gave that a shot and (to my surprise) succeeded. Please test the referenced pull request.

@Glavin001
Copy link
Owner

Published to v0.12.0

@notslang
Copy link

If you want to get rid of the pandoc dep, I wrote a markdown beautifier in pure JS: https://github.com/slang800/tidy-markdown (so it can be required via npm)

@Glavin001
Copy link
Owner

Awesome! Could you open an issue for this? I'd like to add support for tidy-markdown for Atom Beautify v1.0 😃

@notslang
Copy link

gladly! ref: #292

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

No branches or pull requests

3 participants