From 924b4e5db1d91c8fdcd5b03e961b4a476f6df9a7 Mon Sep 17 00:00:00 2001 From: Kirill Morozov Date: Mon, 18 Apr 2022 16:17:27 +0300 Subject: [PATCH] fix(rules/fence): trim info trailling whitespaces trim trailling whitespaces from info field of the fence token --- lib/rules_block/fence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rules_block/fence.js b/lib/rules_block/fence.js index 44f1538..df39ae3 100644 --- a/lib/rules_block/fence.js +++ b/lib/rules_block/fence.js @@ -89,7 +89,7 @@ module.exports = function fence(state, startLine, endLine, silent) { state.line = nextLine + (haveEndMarker ? 1 : 0); token = state.push('fence', 'code', 0); - token.info = params; + token.info = params.trim(); token.content = state.getLines(startLine + 1, nextLine, len, true); token.markup = markup; token.map = [ startLine, state.line ];