Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typographer] Quotes between emphasis characters and link are rendered as normal quotes #133

Closed
bhavin192 opened this issue May 31, 2020 · 1 comment

Comments

@bhavin192
Copy link

  1. What version of goldmark are you using? :
    Latest from master i.e. v1.1.31 or 3d78558
  2. What version of Go are you using? :
    go version go1.14.2 linux/amd64
  3. What operating system and processor architecture are you using? :
    Fedora 32 on amd64
  4. What did you do? :
package main

import (
	"bytes"
	"fmt"

	"github.com/yuin/goldmark"
	"github.com/yuin/goldmark/extension"
)

func main() {
	md := goldmark.New(goldmark.WithExtensions(extension.Typographer))

	source := `*"[Some link here](https://geeksocket.in)" and more text here.*`
	var buf bytes.Buffer
	if err := md.Convert([]byte(source), &buf); err != nil {
		panic(err)
	}
	fmt.Println(buf.String())

	source2 := `**"[Another link](https://geeksocket.in)"**`
	var buf2 bytes.Buffer
	if err := md.Convert([]byte(source2), &buf2); err != nil {
		panic(err)
	}
	fmt.Println(buf2.String())
}
  1. What did you expect to see? :
    The quotes in both cases to be “ and ”.
  2. What did you see instead? :
    The quotes near * are " instead of “ and ”.
<p><em>&quot;<a href="https://geeksocket.in">Some link here</a>&rdquo; and more text here.</em></p>

<p><strong>&quot;<a href="https://geeksocket.in">Another link</a>&quot;</strong></p>
  1. Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension?:
    Yes, enabled Smart punctuation option.
@bhavin192
Copy link
Author

Duplicate of #128
Closing, reason #39 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant