From 9e5734cf76585705e259ae6c3585980ce8b994c1 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 30 Sep 2025 23:18:20 +0200 Subject: feat(markdown): code block and better handle of inline code --- mardown/ast_modifier.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'mardown/ast_modifier.go') diff --git a/mardown/ast_modifier.go b/mardown/ast_modifier.go index 80552e2..570fbd2 100644 --- a/mardown/ast_modifier.go +++ b/mardown/ast_modifier.go @@ -17,7 +17,6 @@ type modifierTag string const ( boldTag modifierTag = "b" emTag modifierTag = "em" - codeTag modifierTag = "code" ) type astModifier struct { @@ -62,7 +61,7 @@ func modifier(lxs *lexers) (*astModifier, error) { switch lxs.Current().Type { case lexerLiteral: s += lxs.Current().Value - case lexerModifier, lexerCode: + case lexerModifier: n := len(modInside.symbols) if len(lxs.Current().Value) < n { return nil, ErrInvalidModifier @@ -87,11 +86,7 @@ func modifierDetect(val string) *astModifier { mod := new(astModifier) if len(val) == 1 { mod.symbols = val - if val == "`" { - mod.tag = codeTag - } else { - mod.tag = emTag - } + mod.tag = emTag return mod } if val[:2] == "**" || val[:2] == "__" { -- cgit v1.2.3