mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
#248 - 3
This commit is contained in:
parent
f5dcbd8208
commit
bc90544cef
2 changed files with 16 additions and 2 deletions
|
|
@ -496,3 +496,17 @@ _a[b_c_](d)
|
||||||
//- - - - - - - - -//
|
//- - - - - - - - -//
|
||||||
<pre><code>\t x\n</code></pre>
|
<pre><code>\t x\n</code></pre>
|
||||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
38: Decimal HTML entity literals should allow 7 digits
|
||||||
|
//- - - - - - - - -//
|
||||||
|
�
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<p>\uFFFD</p>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
39: Decimal HTML entities should not be interpreted as octal when starting with a 0
|
||||||
|
//- - - - - - - - -//
|
||||||
|
d
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<p>d</p>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
|
||||||
|
|
@ -745,8 +745,8 @@ func (d *defaultWriter) Write(writer util.BufWriter, source []byte) {
|
||||||
} else if nc >= '0' && nc <= '9' {
|
} else if nc >= '0' && nc <= '9' {
|
||||||
start := nnext
|
start := nnext
|
||||||
i, ok = util.ReadWhile(source, [2]int{start, limit}, util.IsNumeric)
|
i, ok = util.ReadWhile(source, [2]int{start, limit}, util.IsNumeric)
|
||||||
if ok && i < limit && i-start < 8 && source[i] == ';' && i-start < 7 {
|
if ok && i < limit && i-start < 8 && source[i] == ';' {
|
||||||
v, _ := strconv.ParseUint(util.BytesToReadOnlyString(source[start:i]), 0, 32)
|
v, _ := strconv.ParseUint(util.BytesToReadOnlyString(source[start:i]), 10, 32)
|
||||||
d.RawWrite(writer, source[n:pos])
|
d.RawWrite(writer, source[n:pos])
|
||||||
n = i + 1
|
n = i + 1
|
||||||
escapeRune(writer, rune(v))
|
escapeRune(writer, rune(v))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue