mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fixes #219
This commit is contained in:
parent
43353aeea4
commit
38f7fc92ff
2 changed files with 13 additions and 0 deletions
|
|
@ -60,3 +60,11 @@
|
|||
//- - - - - - - - -//
|
||||
<h2 id="test--hey-sortclassfineclassshell-doesnt-matter">Test ## {#hey .sort,class=fine,class=shell} Doesn't matter</h2>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
||||
|
||||
6: class must be a string
|
||||
//- - - - - - - - -//
|
||||
# Test ## {class=0#.}
|
||||
//- - - - - - - - -//
|
||||
<h1 id="test--class0">Test ## {class=0#.}</h1>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
|
|
|||
|
|
@ -129,6 +129,11 @@ func parseAttribute(reader text.Reader) (Attribute, bool) {
|
|||
if !ok {
|
||||
return Attribute{}, false
|
||||
}
|
||||
if bytes.Equal(name, attrNameClass) {
|
||||
if _, ok = value.([]byte); !ok {
|
||||
return Attribute{}, false
|
||||
}
|
||||
}
|
||||
return Attribute{Name: name, Value: value}, true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue