diff --git a/inline.go b/inline.go index 3f39b52..d9ad3aa 100644 --- a/inline.go +++ b/inline.go @@ -910,7 +910,7 @@ func isMailtoAutoLink(data []byte) int { // look for the next emph char, skipping other constructs func helperFindEmphChar(data []byte, c byte) int { - i := 1 + i := 0 for i < len(data) { for i < len(data) && data[i] != c && data[i] != '`' && data[i] != '[' { diff --git a/inline_test.go b/inline_test.go index 3821d49..82b470a 100644 --- a/inline_test.go +++ b/inline_test.go @@ -263,6 +263,12 @@ func TestStrong(t *testing.T) { "mix of **markers__\n", "

mix of **markers__

\n", + + "**`/usr`** : this folder is named `usr`\n", + "

/usr : this folder is named usr

\n", + + "**`/usr`** :\n\n this folder is named `usr`\n", + "

/usr :

\n\n

this folder is named usr

\n", } doTestsInline(t, tests) } @@ -291,7 +297,7 @@ func TestEmphasisMix(t *testing.T) { "

improper *nesting is* bad

\n", "*improper **nesting* is** bad\n", - "

improper **nesting is** bad

\n", + "

*improper nesting* is bad

\n", } doTestsInline(t, tests) }