Skip to content

Add goldmark-cjk-friendly extension #14114

@Martin005

Description

@Martin005

Hugo currently exposes goldmark's built-in CJK extension in its goldmark markup config. But as discussed in yuin/goldmark#529, there are some shortcomings with using just this extension.

For example, the existing CJK extension doesn't handle the emphasis correctly:
Git **(ギット)**Hub

is transformed to:
<p>Git **(ギット)**Hub</p>

even though it should be transformed to:
<p>Git <strong>(ギット)</strong>Hub</p>

@tats-u has created a lot of extensions for existing Markdown libraries to support CJK emphasis https://github.com/tats-u/markdown-cjk-friendly/.
And he recently also created an extension for goldmark: https://github.com/tats-u/goldmark-cjk-friendly.

I believe it would be beneficial to include this extension directly in Hugo so that users could build CJK websites in Hugo 🙂

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions