Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
developit authored May 11, 2020
2 parents 9ea7bcf + 2ae45a9 commit 5a6047a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Compressed Size

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- name: npm install, build, and test
run: |
npm install
npm run prepare --if-present
npm test
env:
CI: true
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<p align="center">
<img src="https://cdn.jsdelivr.net/emojione/assets/svg/1f63c.svg" width="256" height="256" alt="Snarkdown">
<br>
<a href="https://www.npmjs.org/package/snarkdown"><img src="https://img.shields.io/npm/v/snarkdown.svg?style=flat" alt="npm"></a> <a href="https://travis-ci.org/developit/snarkdown"><img src="https://travis-ci.org/developit/snarkdown.svg?branch=master" alt="travis"></a>
</p>

<h1 align="center">
Snarkdown
<a href="https://www.npmjs.org/package/snarkdown">
<img src="https://img.shields.io/npm/v/snarkdown.svg?style=flat" alt="npm">
</a>
</h1>

Snarkdown is a dead simple **1kb** [Markdown] parser.

Expand All @@ -17,6 +20,8 @@ It's designed to be as minimal as possible, for constrained use-cases where a fu
- **Simple:** pass a Markdown string, get back an HTML string

> **Note:** Tables are not yet supported. If you love impossible to read regular expressions, submit a PR!
>
> **Note on XSS:** Snarkdown [doesn't sanitize HTML](https://github.com/developit/snarkdown/issues/70), since its primary target usage doesn't require it.
## Demos & Examples

Expand All @@ -39,10 +44,10 @@ console.log(html);
// <em>this</em> is <strong>easy</strong> to <code>use</code>.
```

### Add-ons and Libraries

## License
- For Webpack users, [`snarkdown-loader`](https://github.com/Plugin-contrib/snarkdown-loader) renders markdown files to html.

MIT


[Markdown]: http://daringfireball.net/projects/markdown/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/snarkdown.js",
"module": "dist/snarkdown.es.js",
"umd:main": "dist/snarkdown.umd.js",
"types": "snarkdown.d.ts",
"scripts": {
"build": "microbundle",
"dev": "microbundle watch",
Expand Down
6 changes: 6 additions & 0 deletions snarkdown.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module "snarkdown" {
interface Links {
[index: string]: string;
}
export default function (urlStr: string, prevLinks?: Links): string;
}

0 comments on commit 5a6047a

Please sign in to comment.