8000 Can you also support minify a markdown? · Issue #597 · tdewolff/minify · GitHub
[go: up one dir, main page]

Skip to content

Can you also support minify a markdown? #597

Open

Description

@bestian

function minifyMd(content) {
    // Remove extra whitespace
    let minified = content.replace(/\s+/g, ' ');
    // Remove unnecessary line breaks
    minified = minified.replace(/\n /g, '\n').replace(/ \n/g, '\n');
    return minified;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0