Skip to content

Commit

Permalink
Bump to v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Jan 22, 2017
1 parent 8eda8d4 commit d02682b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# v0.1.1

* Changes the default for `throw_on_error` to `true` to align with KaTeX native.
* Also catches KaTeX `ParseError` when `throw_on_error` is `false`.
* Fixes Rails assets resolution.
* Updates KaTeX to v0.7.1.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It uses [ExecJS] under the hood.
Add this line to your application's Gemfile:

```ruby
gem 'katex', '~> 0.1.0'
gem 'katex', '~> 0.1.1'
```

And then execute:
Expand All @@ -30,6 +30,18 @@ Katex.render 'c = \\pm\\sqrt{a^2 + b^2}'

If you're on Rails, the result is marked as `html_safe`.

Any error in the markup is raised by default. To avoid this and render error
text instead, pass `throw_on_error: false`:

```ruby
Katex.render '\\', throw_on_error: false
```

Note that this will catch even `ParseError`s (unlike native KaTeX).

Learn more about all the available options in the
[documentation](http://www.rubydoc.info/gems/katex/Katex#render-class_method).

### Assets

For this rendered math to look nice, you will also need to include KaTeX CSS
Expand Down
2 changes: 1 addition & 1 deletion lib/katex/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Katex
VERSION = '0.1.0'
VERSION = '0.1.1'
KATEX_VERSION = 'v0.7.1'
end

0 comments on commit d02682b

Please sign in to comment.