Skip to content

Add an option to render to span elements #10

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

Merged
merged 1 commit into from
Feb 11, 2016
Merged

Conversation

a3nm
Copy link
Contributor

@a3nm a3nm commented Jan 18, 2016

I wanted to render MathJax to span elements so that it also works on browsers without JavaScript support or with JavaScript disabled, so I added an option to do this. Do you think it is reasonable to merge? Thanks!

def verify(self, mkd_name, html_name, enable_dollar_delimiter=False):
config = {'enable_dollar_delimiter': enable_dollar_delimiter}
def verify(self, mkd_name, html_name, enable_dollar_delimiter=False,
render_to_span=False):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of adding a new argument if you don't use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency with enable_dollar_delimiter which was already there. Should render_to_span be used differently than enable_dollar_delimiter then?

@mitya57
Copy link
Owner

mitya57 commented Feb 10, 2016

Thanks for your pull request and sorry for the delay (I somehow marked the mail as read and forgot about it).

I have now posted some comments. If you amend the commit with fixes for them, I will merge it.

config = {'enable_dollar_delimiter': enable_dollar_delimiter}
def verify(self, mkd_name, html_name, enable_dollar_delimiter=False,
render_to_span=False):
config = {'enable_dollar_delimiter': enable_dollar_delimiter,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable_dollar_delimiter is actually used in one of the tests. I don't mind if you test your option too, but if you don't, please remove the useless argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not add a test. I thought it more logical to add an argument even if currently unused, in case some test for it were added later. But OK, I'll remove it.

@a3nm a3nm force-pushed the master branch 2 times, most recently from af04cf8 to 5e0cf90 Compare February 10, 2016 21:13
@a3nm
Copy link
Contributor Author

a3nm commented Feb 10, 2016

On Wed, Feb 10, 2016 at 11:11:26AM -0800, Dmitry Shachnev wrote:

Thanks for your pull request and sorry for the delay (I somehow marked the mail as read and forgot about it).

I have now posted some comments. If you amend the commit with fixes for them, I will merge it.

No worries, thanks for the review! Should be OK now, please have a look.

Best,

Antoine Amarilli

@mitya57
Copy link
Owner

mitya57 commented Feb 10, 2016

Thanks! I will merge it tomorrow morning.

@mitya57 mitya57 merged commit 46f3729 into mitya57:master Feb 11, 2016
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

Successfully merging this pull request may close these issues.

2 participants