Skip to content

Markdown playground

Ed Bacher edited this page Feb 13, 2018 · 21 revisions

Note: This a page for testing out github-Markdown formatting.

Checkboxes

In the Github wiki, these format like checkboxes, but they are not active.

  • whole chicken, shallots
  • case of Racer 5

Formatted text and soft line breaks

There's no way to detect a soft line break in a Doc using Apps Script, so if you have some bold text with a soft line break in the middle, like this (in the Doc):

This is a line with a soft line break (shift-enter) here
Followed by some more text.

The converted text looks like this:

This is a line with a soft line **break (shift-enter) here
Followed** by some more text.

But it renders fine (except there is no line break):

This is a line with a soft line break (shift-enter) here Followed by some more text.

Soft line-breaks done properly

While Google Docs doesn't know specifically about soft line-breaks, it is possible to search and replace the \r characters that represent them. We will do this soon.

Proper Markdown for soft line-breaks (shift-enter):

lineBreak \
This line contains a shift-enter soft line-break here \
This bit is after the line break.

Some rendered soft line-breaks:

lineBreak
This line contains a shift-enter soft line-break here
This bit is after the line break.

This is a line with some bold text interrupted by a soft line break (shift-enter) here
Followed by more bold
and some more regular text.

This paragraph has an explicit line-break (Enter) here.

And this is a separate paragraph.

Clone this wiki locally