Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp committed Oct 9, 2024
1 parent 886b213 commit e4c7ecd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
22 changes: 13 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# Changelog

## 0.2.0-dev
## 0.2.0 (2024-10-09)

### Breaking changes
* `to_html/1` and `to_html/2` now returns `{:ok, String.t()}` or `{:error, %MDEx.DecodeError{}}` instead of just `String.t()`.
The reason is because now they may accept an AST as input which may cause decoding errors.
Replace with `to_html!/1` and `to_html!/2` to have the same behavior as before.

### Fixes
* Fix misspelling of `thematic` causing render errors - [#73](https://github.com/leandrocp/mdex/pull/73) by @jonklein

### Enhancements
* Added `to_commonmark/1` and `to_commonmark/2` to convert an AST to CommonMark - [#70](https://github.com/leandrocp/mdex/pull/70) by @jonklein
* Added `~M` sigil with `a` (AST) modifier (defaults to HTML without the modifier)
* Added `~M` sigil (no interpolation) with `AST` and `MD` modifiers (defaults to HTML without the modifier)
* Added `~m` sigil (supports interpolation and escaping) with `AST` and `MD` modifiers (defaults to HTML without the modifier)
* Added `parse_document/1` and `parse_document/2` to parse Markdown to AST
* Added `traverse_and_update/2` and `attribute/2` to manipulate AST
* Added `to_html!/1` and `to_html!/2`
* Added low-level functions `traverse_and_update/2` and `attribute/2` to manipulate AST
* Added `to_html!/1` and `to_html!/2`, the raising version of `to_html/1` and `to_html/2` (similar to previous `to_html/1` and `to_html/2`)
* Changed `to_html/1` and `to_html/2` to accept AST as input
* Added examples directory to show how to use the new APIs

### Breaking changes
* `to_html/1` and `to_html/2` now returns `{:ok, String.t()}` or `{:error, %MDEx.DecodeError{}}` instead of just `String.t()`
The reason is because now they may accept an AST as input which may cause decoding errors.
Replace with `to_html!/1` and `to_html!/2` to have a similar behavior as before.

## 0.1.18 (2024-07-13)

### Enhancements
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Add `:mdex` dependency:
```elixir
def deps do
[
{:mdex, "~> 0.1"}
{:mdex, "~> 0.2"}
]
end
```

## Usage

```elixir
Mix.install([{:mdex, "~> 0.1"}])
Mix.install([{:mdex, "~> 0.2"}])
```

```elixir
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule MDEx.MixProject do
use Mix.Project

@source_url "https://github.com/leandrocp/mdex"
@version "0.2.0-dev"
@version "0.2.0"
@dev? String.ends_with?(@version, "-dev")
@force_build? System.get_env("MDEX_BUILD") in ["1", "true"]

Expand Down

0 comments on commit e4c7ecd

Please sign in to comment.