Questions tagged [markdown]

Markdown is a plain text formatting syntax designed so that it can be converted to HTML using a tool by the same name. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.

Markdown is a lightweight markup language, originally created by John Gruber and Aaron Swartz, allowing people “to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)”. The language takes many cues from existing conventions for marking up plain text in email.

Markdown is also a Perl script written by Gruber, “Markdown.pl”, which converts marked-up text input to valid, well-formed XHTML or HTML and replaces left-pointing angle brackets (<) and ampersands with their corresponding character entity references. It can be used as a standalone script, as a plugin for Blosxom or Movable Type, or as a text filter for BBEdit.

Markdown has since been re-implemented by others as a Perl module available on CPAN (Text::Markdown), and in a variety of other programming languages. It is distributed under a BSD-style license and is included with, or available as a plugin for, several content-management systems.

StackOverflow uses Markdown.

This wiki entry was copied from Wikipedia.

Formatting using markdown

Different markdown dialects use slightly different formatting, but here are the general ideas:

You can use ** or __ to start and end bold text.

**Danger:** you need to prepare user inputs to avoid SQL injection.

You can use * or _ to start and end italic text.

_A Christmas Carol_ is a book written by Charles Dickens.

You can use backticks to format code text.

An `if` statement checks a condition, and runs code if it is true.

You can use ``` to format entire code blocks (like the one below)

Here is some code:
```
for (i = 0; i < 10; i++) {
    print "hi";
}
```

You can use > at the start of a line to insert a quote.

The specification says:
> You need to put x and y in brackets

Markdown dialects

A number of Markdown dialects are in widespread use, most of which add or enhance support for things like tables and links. Notable examples include

Babelmark may be used to compare the output generated by different implementations of Markdown.

Since 2014, you also have CommonMark, a strongly defined, highly compatible specification of Markdown (see "Standard Markdown is now Common Markdown").

7087 questions
3
votes
2 answers

A simpler markdown converter for node.js

I have a node.js app and I want to allow my users to enhance their messages with a little markdown. But only a little. I want Sanitization Bold (**) and Italics (*) Links And that's about it, nothing more. But I may need more later, when extending…
Lanbo
  • 13,437
  • 14
  • 67
  • 141
3
votes
2 answers

Retrieving variables (document metadata) from a MultiMarkdown document with PHP

How can I retrieve MultiMarkdown document metadata (as defined here) using php? I was rather surprised that I couldn't find a MultiMarkdown php parser, PHP Markdown Extra doesn't do MultiMarkdown. I'm afraid that the scripts that MultiMarkdown's…
pax
  • 398
  • 5
  • 24
3
votes
2 answers

MarkdownSharp is converting Url's that contain underscore characters

I am using MarkdownSharp in one of my projects and have noticed that if any of my Url's contain pairs of underscore characters somewhere within it, it's treated as italic and therefore replaces the _ with . I've had a look on google but can't…
marcusstarnes
  • 5,999
  • 11
  • 57
  • 107
3
votes
1 answer

nested Quotes in Markdown are not working correctly

I have problem with quotes in markdown. when i have something like this: text > quoted text > > deeper layer > > > even deeper layer it works fine. but when there is a reply with a layer not so deep: > quoted text > > deeper…
allo
  • 3,234
  • 5
  • 31
  • 53
3
votes
4 answers

Blogging engine with built in SASS/Compass and HAML

I absolutely love what HAML and SASS have done for my design habits. I want to switch my blog over from Wordpress to something that supports SASS, Compass, and HAML natively (bonus points for Markdown and Liquid support). What's out there? Typo and…
Zak
  • 357
  • 1
  • 4
  • 14
3
votes
0 answers

Markdown "plugin" for Visual studio 2008

There is a plugin called Markdown Mode for Visual studio 2010, that enables you to preview Markdown in Visual studio 2010 (duh). Is there something similar for Visual studio 2008? What would be the easiest way to enable Markdown preview in VS2008?
Rook
  • 54,867
  • 44
  • 156
  • 233
3
votes
0 answers

Is there a way to format blogger.com posts the same way I do in stackoverflow?

For syntax highlighting, Syntax highlighter seems the best solution. But is there an engine to format blog posts with the same markdown as stackoverflow, because I find it quite usefull, especially the inline code (with ``), and the blockquote. Can…
Benjamin Crouzier
  • 34,915
  • 36
  • 154
  • 219
3
votes
1 answer

How do i convert WMD markdown syntax to HTML on my site?

Am using django and am implementing WMD on my site, am just wondering how do i convert the markdown syntax to HTML for display purposes, is there some sort of function i should call to do this conversion? What is the best way to handle markdown ie.…
gath
  • 21,746
  • 35
  • 91
  • 120
3
votes
4 answers

Redcarpet/Bluecloth not allowing headers?

Is there a way to use either Redcarpet or Bluecloth such that when it interpolates the markdown it won't make any headers? For example: #header 1 yields: header 1 header 1 (preferred) And: ##header 2 yields: header 2 header 2 (preferred)
Cyrus
  • 3,587
  • 4
  • 31
  • 66
3
votes
1 answer

OpenSource Wiki hosting

I have several .md files (in markdown format) initially on github, but I would like to put it up as a wiki with a custom link. I use the Gollum gem and like it alot, however it is only built on top of github or use in local server to edit the files…
John Lee
  • 1,171
  • 2
  • 15
  • 29
3
votes
1 answer

Maruku/Markdown syntax meaning "+--" "=--"

I came across some syntax in a raw Markdown file which I believe might be Maruku specific: +--{.abstract} ### Abstract Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut…
JoshAdel
  • 57,369
  • 23
  • 130
  • 131
3
votes
1 answer

Folding of text in vim with Markdown syntax plugin

I have a Markdown syntax highlighting plugin installed for Vim (MacVim). It's working well, but it automatically folds down headings, lists, etc. Does anyone know how to disable the folding of sections completely with a plugin like this? I just want…
colemanm
  • 235
  • 1
  • 2
  • 6
3
votes
1 answer

Github-flavored markdown: do not interpret emojis?

In a README.md file for a GitHub repo I am working on, we want to display a URL that has the string of characters :x: in it (unfortunately the link is to a data repo so I can't post it). However, GitHub interprets the :x: as ❌ and it irritates me so…
wz-billings
  • 298
  • 1
  • 11
3
votes
1 answer

Boost Spirit x3 parser has attribute of type std::vector> instead of std::string

Context I am using Boost Spirit X3 to generate HTML from Markdown files like this: // simplified code structure auto str = x3::lexeme[+(x3::char_ - x3::eol)]; auto h1_action = [&](auto& ctx) { /* generate output */ }; auto h1 = ("# " >…
melina
  • 68
  • 5
3
votes
2 answers

Is there a way to display last build id in markdown in azure devops dashboard?

I was looking for the way to display badges of all build and release pipelines from the project on one dashboard and I've found that the best way to do it on one widget is to use markdown widget and just create a table with all the pipelines and…
1 2 3
99
100