whatisgithub

What is markdown-it-emphasis-alt?

ruanyf/markdown-it-emphasis-alt — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2016-04-19

2JavaScriptAudience · developerComplexity · 1/5DormantSetup · easy

In one sentence

A markdown-it plugin that relaxes markdown's emphasis rules so bold and italic markers work even with spaces around them.

Mindmap

mindmap
  root((repo))
    What it does
      Lenient emphasis parsing
      Ignores whitespace rules
      markdown-it plugin
    Tech stack
      JavaScript
      markdown-it
    Use cases
      Custom markdown parsing
      User-friendly formatting
    Audience
      Web developers
      Node.js developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Allow users to write bold text with spaces inside the asterisks without breaking formatting.

USE CASE 2

Make markdown parsing more forgiving in apps where users don't follow strict whitespace rules.

USE CASE 3

Swap in this plugin for default emphasis parsing in an existing markdown-it setup.

What is it built with?

JavaScriptmarkdown-itNode.js

How does it compare?

ruanyf/markdown-it-emphasis-alt3imed-jaberi/cryptography-si-isamm3imed-jaberi/koa-isomorphic-router
Stars222
LanguageJavaScriptJavaScriptJavaScript
Last pushed2016-04-192021-09-252021-02-06
MaintenanceDormantDormantDormant
Setup difficultyeasyeasyeasy
Complexity1/51/52/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

This is a small plugin that changes how markdown converts emphasis markers (asterisks and underscores) into italic and bold text in HTML. Normally, markdown has strict rules about when or _ characters create emphasis, it looks at spaces and other punctuation around them to figure out if you're opening or closing an italic or bold section. This plugin throws out those rules and uses a simpler approach: it just looks at the markers themselves, ignoring whitespace. So italic* and bold (with spaces inside) both work as expected, which the standard markdown spec wouldn't allow. The plugin works by hooking into markdown-it, which is a popular JavaScript library for converting markdown text into HTML. Once you install this plugin and attach it to your markdown-it instance, any text you process will use this alternative emphasis parsing instead of the default behavior. From the user's perspective, you write markdown as usual and get back HTML with <em> tags for italics and <strong> tags for bold. You'd use this if the standard markdown emphasis rules feel too strict or pedantic for your use case, for instance, if you want to allow spaces around bold text without breaking the formatting, or if you're working in an environment where users don't think carefully about whitespace. It's a JavaScript package, so it works in Node.js projects and can also be embedded directly in web pages. The README doesn't go into detail about edge cases or why you might prefer this approach over standard markdown, but the core idea is straightforward: a more lenient parser for making text italic and bold.

Copy-paste prompts

Prompt 1
Show me how to install and attach this plugin to a markdown-it instance in Node.js.
Prompt 2
Explain how this plugin's emphasis parsing differs from standard markdown rules.
Prompt 3
Help me write a test comparing default markdown-it emphasis output to this plugin's output.
Prompt 4
Show me how to use this plugin in a browser-based markdown editor.

Frequently asked questions

What is markdown-it-emphasis-alt?

A markdown-it plugin that relaxes markdown's emphasis rules so bold and italic markers work even with spaces around them.

What language is markdown-it-emphasis-alt written in?

Mainly JavaScript. The stack also includes JavaScript, markdown-it, Node.js.

Is markdown-it-emphasis-alt actively maintained?

Dormant — no commits in 2+ years (last push 2016-04-19).

How hard is markdown-it-emphasis-alt to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is markdown-it-emphasis-alt for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.