From d4500df32b9879691da2b9789b1b004aaf0cd9ee Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Fri, 19 Aug 2022 18:28:29 -0400 Subject: [PATCH] Move README --- README.md | 97 +----------------------------------- packages/steamdown/README.md | 97 +++++++++++++++++++++++++++++++++++- 2 files changed, 97 insertions(+), 97 deletions(-) mode change 100644 => 120000 README.md mode change 120000 => 100644 packages/steamdown/README.md diff --git a/README.md b/README.md deleted file mode 100644 index b77d2c8..0000000 --- a/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# steamdown - -[![CI](https://github.com/spenserblack/steamdown/actions/workflows/ci.yml/badge.svg)](https://github.com/spenserblack/steamdown/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/spenserblack/steamdown/branch/main/graph/badge.svg?token=aclgMScPvh)](https://codecov.io/gh/spenserblack/steamdown) - -Converts Markdown to [Steam's markup][format]. - -## Usage - -### Library - -```typescript -import parse from 'steamdown'; - -console.log(parse(text)); -``` - -### CLI - -```bash -# read from STDIN -steamdown - -# or -cat file.md | steamdown - -# read from file -steamdown file.md -``` - -## Differences from Markdown - -View the [input spec][basic input] and [output spec][snapshots] for an -example. - -### Images - -Images are *not* supported, render to links. For example, -`![example](/image.png)` becomes `[url=/image.png]example[/url]`. - -### Underlines (`[u]`) - -Wrapping text with `__` does *not* make it italicized, but makes it underlined -(`__underlined text__`). - -### Spoiler Text (`[spoiler]`) - -Wrapping text with `!!!` makes it spoiler text (`!!!hidden text!!!`). - -### Quote Authors - -Quotes can have authors by adding `(author)` after text preceded with a `>`. -For this reason, continuing a quote on a newline *without* preceding each line -with a `>` is considered undocumented behavior. - -#### Example - -```markdown ->this is some text that I'm ->responding to. -(some person) -``` - -### Literal Text (`[noparse]`) - -Steam's `[noparse]` tag instructs Steam to render text like `[b]this[/b]` -literally, without styling. In addition to rendering a `[noparse]` block, -steamdown's literal text rule will also prevent parsing of the source text. -For example, `*this*` would not be converted to `[i]this[/i]`. - -#### Inline - -Text can be made literal by wrapping it with `{{{` and `}}}` -(`{{{[b]The bold tag is rendered[/b]}}}`). - -#### Block Level - -Any lines between `{{{` and `}}}` will be rendered without -any parsing. - -##### Example - -```markdown -{{{ -[b] is bold -[u] is underline -}}} -``` - -## Limitations - -Steam supports tables with no borders (`[table noborder=1]`) and equal-width cells -(`[table equalcells=1]`). These are not currently supported. Syntax proposals welcome! - -[format]: https://steamcommunity.com/comment/Guide/formattinghelp -[basic input]: /packages/steamdown/__tests__/input/basic.md -[snapshots]: /packages/steamdown/__tests__/__snapshots__/ diff --git a/README.md b/README.md new file mode 120000 index 0000000..7455ae5 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +./packages/steamdown/README.md \ No newline at end of file diff --git a/packages/steamdown/README.md b/packages/steamdown/README.md deleted file mode 120000 index fe84005..0000000 --- a/packages/steamdown/README.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/packages/steamdown/README.md b/packages/steamdown/README.md new file mode 100644 index 0000000..b77d2c8 --- /dev/null +++ b/packages/steamdown/README.md @@ -0,0 +1,96 @@ +# steamdown + +[![CI](https://github.com/spenserblack/steamdown/actions/workflows/ci.yml/badge.svg)](https://github.com/spenserblack/steamdown/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/spenserblack/steamdown/branch/main/graph/badge.svg?token=aclgMScPvh)](https://codecov.io/gh/spenserblack/steamdown) + +Converts Markdown to [Steam's markup][format]. + +## Usage + +### Library + +```typescript +import parse from 'steamdown'; + +console.log(parse(text)); +``` + +### CLI + +```bash +# read from STDIN +steamdown - +# or +cat file.md | steamdown + +# read from file +steamdown file.md +``` + +## Differences from Markdown + +View the [input spec][basic input] and [output spec][snapshots] for an +example. + +### Images + +Images are *not* supported, render to links. For example, +`![example](/image.png)` becomes `[url=/image.png]example[/url]`. + +### Underlines (`[u]`) + +Wrapping text with `__` does *not* make it italicized, but makes it underlined +(`__underlined text__`). + +### Spoiler Text (`[spoiler]`) + +Wrapping text with `!!!` makes it spoiler text (`!!!hidden text!!!`). + +### Quote Authors + +Quotes can have authors by adding `(author)` after text preceded with a `>`. +For this reason, continuing a quote on a newline *without* preceding each line +with a `>` is considered undocumented behavior. + +#### Example + +```markdown +>this is some text that I'm +>responding to. +(some person) +``` + +### Literal Text (`[noparse]`) + +Steam's `[noparse]` tag instructs Steam to render text like `[b]this[/b]` +literally, without styling. In addition to rendering a `[noparse]` block, +steamdown's literal text rule will also prevent parsing of the source text. +For example, `*this*` would not be converted to `[i]this[/i]`. + +#### Inline + +Text can be made literal by wrapping it with `{{{` and `}}}` +(`{{{[b]The bold tag is rendered[/b]}}}`). + +#### Block Level + +Any lines between `{{{` and `}}}` will be rendered without +any parsing. + +##### Example + +```markdown +{{{ +[b] is bold +[u] is underline +}}} +``` + +## Limitations + +Steam supports tables with no borders (`[table noborder=1]`) and equal-width cells +(`[table equalcells=1]`). These are not currently supported. Syntax proposals welcome! + +[format]: https://steamcommunity.com/comment/Guide/formattinghelp +[basic input]: /packages/steamdown/__tests__/input/basic.md +[snapshots]: /packages/steamdown/__tests__/__snapshots__/