From 1700cdab25d93e2d32a5228ec8096bc93773bc47 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 27 Dec 2021 16:19:00 +0100 Subject: [PATCH] Add message `url` Closes GH-15. Reviewed-by: Christian Murphy Reviewed-by: Titus Wormer --- index.js | 3 ++- test.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 01beb88..76cc180 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ import {pointStart, pointEnd} from 'unist-util-position' import {patterns} from './patterns.js' const source = 'retext-simplify' +const url = 'https://github.com/retextjs/retext-simplify#readme' const keys = Object.keys(patterns) @@ -45,7 +46,7 @@ export default function retextSimplify(options = {}) { {start: pointStart(match[0]), end: pointEnd(match[match.length - 1])}, [source, phrase.replace(/\s+/g, '-').toLowerCase()].join(':') ), - {actual, expected} + {actual, expected, url} ) }) } diff --git a/test.js b/test.js index 5238a0b..0522dab 100644 --- a/test.js +++ b/test.js @@ -26,7 +26,8 @@ test('retext-simplify', (t) => { }, fatal: false, actual: 'utilize', - expected: ['use'] + expected: ['use'], + url: 'https://github.com/retextjs/retext-simplify#readme' } ], 'should emit messages'