From 92adf06772c2bcb7d8ecf30ec27ff82c3f130ca3 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:50:03 +0100 Subject: [PATCH] (fix) no empty line at the end of markdown embed (#203) Prettier's markdown parser tries to strip the last hardline of the embedded docs, but fails to do so in our case because it does not recurse into concat parts -> we need to strip it ourselves. Fixes #202 --- CHANGELOG.md | 4 ++++ src/print/index.ts | 11 ++++++++++- test/printer/samples/markdown.md | 1 - 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4518d55f..937c57fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # prettier-plugin-svelte changelog +## 2.1.3 (Unreleased) + +* Don't print empty line at the end of the code if embedded inside markdown ([#202](https://github.com/sveltejs/prettier-plugin-svelte/issues/202)) + ## 2.1.2 * Keep whitespace around `