2 Commits

  1. 9
      CHANGELOG.md
  2. 4
      lib/mirage/markdown.ex
  3. 2
      mix.exs

9
CHANGELOG.md

@ -5,6 +5,15 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
<!-- changelog -->
## [v0.18.1](https://git.inhji.de/inhji/mirage/compare/v0.18.0...v0.18.1) (2021-02-08)
### Bug Fixes:
* render markdown link instead of html
## [v0.18.0](https://git.inhji.de/inhji/mirage/compare/v0.17.0...v0.18.0) (2021-02-07)

4
lib/mirage/markdown.ex

@ -1,6 +1,4 @@
defmodule Mirage.Markdown do
import Phoenix.HTML.Link, only: [link: 2]
import Phoenix.HTML, only: [safe_to_string: 1]
import Ecto.Changeset, only: [get_change: 2, put_change: 3]
def maybe_render_markdown(changeset, markdown_field, html_field) do
@ -52,6 +50,6 @@ defmodule Mirage.Markdown do
end
def get_link(id, title) do
link(title, to: "/notes/#{id}") |> safe_to_string()
"[#{title}](/notes/#{id})"
end
end

2
mix.exs

@ -1,7 +1,7 @@
defmodule Mirage.MixProject do
use Mix.Project
@version "0.18.0"
@version "0.18.1"
def project do
[

Loading…
Cancel
Save