Skip to content

Latest commit

 

History

History
174 lines (108 loc) · 3.14 KB

emphasis.md

File metadata and controls

174 lines (108 loc) · 3.14 KB

Italic

Use one (1) underscore _ marker to generate spans for italic formatted text.

remark-lint: emphasis-marker

Examples

Incorrect code for this rule:

*Winter*
___Snow___

Correct code for this rule:

_Winter_
_Snow_

Bold

Use two (2) asterisk * marker to generate spans for bold formatted text.

remark-lint: emphasis-marker and strong-marker

Examples

Incorrect code for this rule:

*Winter*
***Snow***

Correct code for this rule:

**Winter**
**Snow**

Strikethrough

Note that strikethrough is an extension of GFM and not implemented by all parsers!

Use two (2) tilde ~ marker to generate spans for strikethrough text.

remark-lint: strikethrough-marker, emphasis-marker

Examples

Incorrect code for this rule:

~Winter~
~~~Snow~~~

Correct code for this rule:

~~Winter~~
~~Snow~~

No Header Replacement

Don't use emphasis elements (bold or italics) to introduce a multi line named section. Use headers instead which is exactly the semantic meaning of headers. As a consequence, many implementations add useful behaviors to headers and not to emphasis elements, such as automatic ID generation (anchor) to make it easier to refer to the header later on. Use a level 6 header if the meaning of the header section should not stand out great.

remark-lint: no-emphasis-as-heading

Examples

Incorrect code for this rule:

**Winter**

The winter has sparkling and frozen elements!

__Snow__

Snow is falling down!

Correct code for this rule:

## Winter

The winter has sparkling and frozen elements!

## Snow

Snow is falling down!
###### Winter

The winter has sparkling and frozen elements!

###### Snow

Snow is falling down!

No Inner Spacing

Don't use inner spaces for any markers.

remark-lint: no-inline-padding

Examples

Incorrect code for this rule:

** Winter **
__ Snow __
**      Winter **
__ Snow            __

Correct code for this rule:

**Winter**
**Snow**