From 517d9f169540061bab852b9cd45e4f6dc90ef983 Mon Sep 17 00:00:00 2001 From: Christoph Herb <52382992+chrishrb@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:07:10 +0100 Subject: [PATCH] 34 Fix wrong new-line behavior --- README.md | 19 +++++++++---------- pkg/parser.go | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4c028e7..37be5b6 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ This project is a reimplementation of the original Python-based [grip](https://g ## :zap: Features -* :zap: Written in Go :+1: -* 📄 Render markdown to HTML and view it in your browser -* 📱 Dark and light theme -* 🎨 Syntax highlighting for code -* [x] Todo list like the one on GitHub -* Support for github markdown emojis :+1: :bowtie: -* Support for mermaid diagrams +- :zap: Written in Go :+1: +- 📄 Render markdown to HTML and view it in your browser +- 📱 Dark and light theme +- 🎨 Syntax highlighting for code +- [x] Todo list like the one on GitHub +- Support for github markdown emojis :+1: :bowtie: +- Support for mermaid diagrams ```mermaid graph TD; @@ -39,7 +39,6 @@ graph TD; > [!TIP] > Support of blockquotes (note, tip, important, warning and caution) [see here](https://github.com/orgs/community/discussions/16925) - ## :rocket: Getting started To install go-grip, simply: @@ -90,8 +89,8 @@ To terminate the current server simply press `CTRL-C`. ## :bug: Known TODOs / Bugs -* [ ] Tests and refactoring -* [ ] Make it possible to export the generated html +- [ ] Tests and refactoring +- [ ] Make it possible to export the generated html ## :pushpin: Similar tools diff --git a/pkg/parser.go b/pkg/parser.go index fc8dde0..7f6e8b7 100644 --- a/pkg/parser.go +++ b/pkg/parser.go @@ -26,7 +26,7 @@ var blockquotes = []string{"Note", "Tip", "Important", "Warning", "Caution"} func (client *Client) MdToHTML(bytes []byte) []byte { extensions := parser.NoIntraEmphasis | parser.Tables | parser.FencedCode | parser.Autolink | parser.Strikethrough | parser.SpaceHeadings | parser.HeadingIDs | - parser.BackslashLineBreak | parser.MathJax | parser.HardLineBreak | parser.OrderedListStart + parser.BackslashLineBreak | parser.MathJax | parser.OrderedListStart p := parser.NewWithExtensions(extensions) doc := p.Parse(bytes)