Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
e1977df1
Commit
e1977df1
authored
Jan 26, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove check underscores
parent
ddc89029
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
10 deletions
+4
-10
bold.go
plugin/gomark/parser/bold.go
+1
-1
bold_italic.go
plugin/gomark/parser/bold_italic.go
+1
-1
horizontal_rule.go
plugin/gomark/parser/horizontal_rule.go
+1
-1
horizontal_rule_test.go
plugin/gomark/parser/horizontal_rule_test.go
+0
-6
italic.go
plugin/gomark/parser/italic.go
+1
-1
No files found.
plugin/gomark/parser/bold.go
View file @
e1977df1
...
@@ -22,7 +22,7 @@ func (*BoldParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
...
@@ -22,7 +22,7 @@ func (*BoldParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
return
nil
,
0
return
nil
,
0
}
}
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
if
prefixTokenType
!=
tokenizer
.
Asterisk
&&
prefixTokenType
!=
tokenizer
.
Underscore
{
if
prefixTokenType
!=
tokenizer
.
Asterisk
{
return
nil
,
0
return
nil
,
0
}
}
...
...
plugin/gomark/parser/bold_italic.go
View file @
e1977df1
...
@@ -21,7 +21,7 @@ func (*BoldItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
...
@@ -21,7 +21,7 @@ func (*BoldItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
return
nil
,
0
return
nil
,
0
}
}
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
if
prefixTokenType
!=
tokenizer
.
Asterisk
&&
prefixTokenType
!=
tokenizer
.
Underscore
{
if
prefixTokenType
!=
tokenizer
.
Asterisk
{
return
nil
,
0
return
nil
,
0
}
}
...
...
plugin/gomark/parser/horizontal_rule.go
View file @
e1977df1
...
@@ -22,7 +22,7 @@ func (*HorizontalRuleParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
...
@@ -22,7 +22,7 @@ func (*HorizontalRuleParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
if
matchedTokens
[
0
]
.
Type
!=
matchedTokens
[
1
]
.
Type
||
matchedTokens
[
0
]
.
Type
!=
matchedTokens
[
2
]
.
Type
||
matchedTokens
[
1
]
.
Type
!=
matchedTokens
[
2
]
.
Type
{
if
matchedTokens
[
0
]
.
Type
!=
matchedTokens
[
1
]
.
Type
||
matchedTokens
[
0
]
.
Type
!=
matchedTokens
[
2
]
.
Type
||
matchedTokens
[
1
]
.
Type
!=
matchedTokens
[
2
]
.
Type
{
return
nil
,
0
return
nil
,
0
}
}
if
matchedTokens
[
0
]
.
Type
!=
tokenizer
.
Hyphen
&&
matchedTokens
[
0
]
.
Type
!=
tokenizer
.
Underscore
&&
matchedTokens
[
0
]
.
Type
!=
tokenizer
.
Asterisk
{
if
matchedTokens
[
0
]
.
Type
!=
tokenizer
.
Hyphen
&&
matchedTokens
[
0
]
.
Type
!=
tokenizer
.
Asterisk
{
return
nil
,
0
return
nil
,
0
}
}
return
&
ast
.
HorizontalRule
{
return
&
ast
.
HorizontalRule
{
...
...
plugin/gomark/parser/horizontal_rule_test.go
View file @
e1977df1
...
@@ -41,12 +41,6 @@ func TestHorizontalRuleParser(t *testing.T) {
...
@@ -41,12 +41,6 @@ func TestHorizontalRuleParser(t *testing.T) {
text
:
"-*-"
,
text
:
"-*-"
,
horizontalRule
:
nil
,
horizontalRule
:
nil
,
},
},
{
text
:
"___"
,
horizontalRule
:
&
ast
.
HorizontalRule
{
Symbol
:
"_"
,
},
},
}
}
for
_
,
test
:=
range
tests
{
for
_
,
test
:=
range
tests
{
...
...
plugin/gomark/parser/italic.go
View file @
e1977df1
...
@@ -20,7 +20,7 @@ func (*ItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
...
@@ -20,7 +20,7 @@ func (*ItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) {
}
}
prefixTokens
:=
matchedTokens
[
:
1
]
prefixTokens
:=
matchedTokens
[
:
1
]
if
prefixTokens
[
0
]
.
Type
!=
tokenizer
.
Asterisk
&&
prefixTokens
[
0
]
.
Type
!=
tokenizer
.
Underscore
{
if
prefixTokens
[
0
]
.
Type
!=
tokenizer
.
Asterisk
{
return
nil
,
0
return
nil
,
0
}
}
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
prefixTokenType
:=
prefixTokens
[
0
]
.
Type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment