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

Options from extracted gems are not output via CLI #569

Closed
ashmaroli opened this issue Jan 21, 2019 · 3 comments
Closed

Options from extracted gems are not output via CLI #569

ashmaroli opened this issue Jan 21, 2019 · 3 comments
Assignees

Comments

@ashmaroli
Copy link
Contributor

After having installed kramdown-2.0.0, running kramdown --help doesn't surface options from the extracted gems.

kramdown --help

I also used a Gemfile and tried again with bundle exec. Still no success!

# Gemfile

gem 'kramdown', '~> 2.0'
gem 'kramdown-parser-gfm'
$ bundle exec kramdown --help

What should a user do to surface options from kramdown-parser-gem gem in the --help output?

@gettalong gettalong self-assigned this Jan 21, 2019
@gettalong
Copy link
Owner

kramdown automatically loads a parser if it is used. So kramdown -i GFM still works, as would kramdown -o pdf for the PDF converter.

I'm open to suggestions for making the options of third-party extensions available to the kramdown binary.

@ashmaroli
Copy link
Contributor Author

A simple route would be a introducing a new flag say -x, --extension [GEM-NAME, [GEM_NAME_2...]]
Usage would be:

$ kramdown -x parser-gfm
# => kramdown options + GFM Parser options

$ kramdown -x parser-gfm, syntax-coderay
# => kramdown options + GFM Parser options + CodeRay options

The binary can abort with an error message if the given extension raises a LoadError exception

@gettalong
Copy link
Owner

I have committed a change which allows specifying extensions. Once specified, the options from the extension can be used with the binary and are shown with the --help option.

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

2 participants