From 012e710140b9d396b2b298abf6371b947204732e Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Thu, 2 Nov 2023 16:36:35 +0000 Subject: [PATCH] fix: GitHub changed their header autolink format Signed-off-by: Mike Ralphson --- index.js | 4 +++- testRunner.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 00703af..a9de12b 100644 --- a/index.js +++ b/index.js @@ -29,8 +29,10 @@ function gfmLink(text) { text = text.split('>').join(''); text = text.split('<').join(''); text = text.split('>').join(''); + text = text.split('(').join(''); + text = text.split(')').join(''); text = text.split(' ').join('-'); - return text; + return text.toLowerCase(); } function define(anchors,name,auto,suffix) { diff --git a/testRunner.js b/testRunner.js index 0f38de3..0536d21 100644 --- a/testRunner.js +++ b/testRunner.js @@ -11,6 +11,7 @@ var mdv = require('./index.js'); var argv = require('yargs') .usage('testRunner [options] [{path-to-specs}...]') + .demand(1) .boolean('debug') .alias('d','debug') .describe('debug','pass debug flag to mdv')