34 Fix wrong new-line behavior

This commit is contained in:
Christoph Herb
2025-02-10 17:07:10 +01:00
parent 96ce1d8c9c
commit 517d9f1695
2 changed files with 10 additions and 11 deletions

View File

@@ -20,13 +20,13 @@ This project is a reimplementation of the original Python-based [grip](https://g
## :zap: Features ## :zap: Features
* :zap: Written in Go :+1: - :zap: Written in Go :+1:
* 📄 Render markdown to HTML and view it in your browser - 📄 Render markdown to HTML and view it in your browser
* 📱 Dark and light theme - 📱 Dark and light theme
* 🎨 Syntax highlighting for code - 🎨 Syntax highlighting for code
* [x] Todo list like the one on GitHub - [x] Todo list like the one on GitHub
* Support for github markdown emojis :+1: :bowtie: - Support for github markdown emojis :+1: :bowtie:
* Support for mermaid diagrams - Support for mermaid diagrams
```mermaid ```mermaid
graph TD; graph TD;
@@ -39,7 +39,6 @@ graph TD;
> [!TIP] > [!TIP]
> Support of blockquotes (note, tip, important, warning and caution) [see here](https://github.com/orgs/community/discussions/16925) > Support of blockquotes (note, tip, important, warning and caution) [see here](https://github.com/orgs/community/discussions/16925)
## :rocket: Getting started ## :rocket: Getting started
To install go-grip, simply: To install go-grip, simply:
@@ -90,8 +89,8 @@ To terminate the current server simply press `CTRL-C`.
## :bug: Known TODOs / Bugs ## :bug: Known TODOs / Bugs
* [ ] Tests and refactoring - [ ] Tests and refactoring
* [ ] Make it possible to export the generated html - [ ] Make it possible to export the generated html
## :pushpin: Similar tools ## :pushpin: Similar tools

View File

@@ -26,7 +26,7 @@ var blockquotes = []string{"Note", "Tip", "Important", "Warning", "Caution"}
func (client *Client) MdToHTML(bytes []byte) []byte { func (client *Client) MdToHTML(bytes []byte) []byte {
extensions := parser.NoIntraEmphasis | parser.Tables | parser.FencedCode | extensions := parser.NoIntraEmphasis | parser.Tables | parser.FencedCode |
parser.Autolink | parser.Strikethrough | parser.SpaceHeadings | parser.HeadingIDs | 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) p := parser.NewWithExtensions(extensions)
doc := p.Parse(bytes) doc := p.Parse(bytes)