Skip to content

Rehype plugin that replaces non-breaking spaces with whitespace

License

Notifications You must be signed in to change notification settings

vwkd/rehype-normalize-spaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Rehype plugin that replaces non-breaking spaces with whitespace

Features

  • replaces non-breaking spaces with whitespace

Example

import { unified, rehypeParse, rehypeStringify } from "./deps.ts";
import rehypeNormalizeSpaces from "./src/main.ts";

const result = (await unified()
  .use(rehypeParse, { fragment: true })
  .use(rehypeNormalizeSpaces)
  .use(rehypeStringify)
  .process(`foo bar`))
  .toString();
console.log(result);

Before

foo bar

After

foo bar

About

Rehype plugin that replaces non-breaking spaces with whitespace

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published