Skip to content
This repository has been archived by the owner. It is now read-only.
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
.npmrc
CHANGELOG.md
README.md
package.json

README.md

@wordpress/autop

JavaScript port of WordPress's automatic paragraph function autop and the removep reverse behavior.

Installation

Install the module

npm install @wordpress/autop --save

Usage

Import the desired function(s) from @wordpress/autop:

import { autop, removep } from '@wordpress/autop';

autop( 'my text' );
// "<p>my text</p>"

removep( '<p>my text</p>' );
// "my text"

API Usage

  • autop( text: string ): string
  • removep( text: string ): string



Code is Poetry.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.