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

Make CSS classes configurable #6

Open
thoward opened this issue Dec 13, 2017 · 0 comments
Open

Make CSS classes configurable #6

thoward opened this issue Dec 13, 2017 · 0 comments

Comments

@thoward
Copy link
Owner

thoward commented Dec 13, 2017

Consumers of the library should be able to pass a configuration object including preferred CSS classes.

EG:

var rstSource = `
* foo
* bar
`;

var output = rst2html(rstSource, {
  css_classes: { 
    list_item: "my-custom-list-item-class" 
  }
});

// output is:
// <ul class="rst-bullet-list">
//   <li class="my-custom-list-item-class">foo</li>
//   <li class="my-custom-list-item-class">bar</li>
// </ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant