Fix emitting invalid line type

This commit is contained in:
Shadowfacts 2020-09-30 22:44:11 -04:00
parent 322c233e18
commit cc6f4e0437
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 2 deletions

View File

@ -72,12 +72,12 @@ defmodule Gemini do
cond do
preformatting_toggle && in_preformatting ->
{[:preformatting_end | lines], false}
{[:preformatted_end | lines], false}
preformatting_toggle && !in_preformatting ->
"```" <> alt = line
alt = if alt == "", do: nil, else: alt
{[{:preformatting_start, alt} | lines], true}
{[{:preformatted_start, alt} | lines], true}
in_preformatting ->
{[{:preformatted, line} | lines], true}