Skip to content

Typography plugin #94

Open
Open
@jace

Description

@jace

The Zine typography plugin (@jace's branch) offers better accuracy than Smartypants. Since it parses HTML and not markdown, it can be applied on both markdown and richtext fields.

Consider this text: I'm positive I was 5'10" by the late '90s.
Smartypants rendering: I’m positive I was 5’10” by the late ‘90s.
Correct rendering: I’m positive I was 5′10″ by the late ’90s.

However, since the Zine plugin is written for Zine's since-abandoned HTML parser, it needs to be rewritten for html5lib. The Zine parser notably differs from html5lib in how it handles text outside a tag.

Caveat: This plugin, like Smartypants, is a batch parser and breaks the realtime WYSIWYG expectations of a richtext widget. Since richtext fields don't store original and rendered text separately, it is also destructive: parser errors cannot be recovered from.

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