From e9ff7af0535bfa05138c6254a5c244f90072e243 Mon Sep 17 00:00:00 2001 From: Mike North Date: Sat, 16 Feb 2019 00:29:37 -0800 Subject: [PATCH] chore: travis badge on README --- README.md | 24 ++++++++++++++++++------ test/acceptance.test.ts | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 64f5a95..590e3a6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # mdast-builder +[![Build Status](https://travis-ci.com/mike-north/mdast-builder.svg?branch=master)](https://travis-ci.com/mike-north/mdast-builder) + Use composable functions to buld up a [`mdast`](https://github.com/syntax-tree/mdast) structure ## Use @@ -9,12 +11,20 @@ yarn add mdast-builder ``` ```ts -import { root, paragraph, text, heading, list, listItem, brk } from 'mdast-builder'; +import { + root, + paragraph, + text, + heading, + list, + listItem, + brk +} from 'mdast-builder'; import * as stringify from 'remark-stringify'; import * as unified from 'unified'; const processor = unified().use(stringify, { - bullet: '*', + bullet: '-', fence: '`', fences: true, incrementListMarker: false @@ -26,6 +36,7 @@ const output = processor.stringify( paragraph([ paragraph(text('these are the starting instructions')), brk, + brk, list('unordered', [ listItem(text('one')), listItem(text('two')), @@ -41,10 +52,11 @@ const output = processor.stringify( ```md ## Begin -these are the starting instructions -* one -* two -* three +these are the starting instructions + +- one +- two +- three ``` ## Legal diff --git a/test/acceptance.test.ts b/test/acceptance.test.ts index 9553172..1964895 100644 --- a/test/acceptance.test.ts +++ b/test/acceptance.test.ts @@ -63,7 +63,7 @@ describe('acceptance tests', () => { expectMd(rootWithTitle(1, text('hello'))).to.eq('# hello\n'); }); - it('root foo', () => { + it('README example', () => { expectMd( root([ heading(2, text('Begin')),