aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_modifier.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-09-30 23:18:20 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-09-30 23:18:20 +0200
commit9e5734cf76585705e259ae6c3585980ce8b994c1 (patch)
tree70b7f4c10379bd1a60173322e7a3f4b804e3ac4d /mardown/ast_modifier.go
parent7b2b9d312791fcf6f49a350f6887a2019d2730f7 (diff)
feat(markdown): code block and better handle of inline code
Diffstat (limited to 'mardown/ast_modifier.go')
-rw-r--r--mardown/ast_modifier.go9
1 files changed, 2 insertions, 7 deletions
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] == "__" {