Git Product home page Git Product logo

goldmark-formatter's Introduction

goldmark-formatter

GoDoc

This goldmark renderer extension adds support for formatting markdown.

source := []byte("# Title\nParagraph *em **bold*** [link](/).")
md := goldmark.New(
    goldmark.WithRenderer(formatter.Markdown), // markdown output
)
if err := md.Convert(source, os.Stdout); err != nil {
    log.Fatal(err)
}
Title
=====

Paragraph *em **bold*** [link](/).

goldmark-formatter's People

Contributors

mdigger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

stepanstipl

goldmark-formatter's Issues

Strips whitespace from description lists

Expected behavior

mdfmt does not remove whitespace from the following text:

Term
: Description of term

Term 2
: Description of term 2

Term 3
: Description of term 3

Actual behavior

mdfmt removes the blank lines between the terms:

Term
: Description of term
Term 2
: Description of term 2
Term 3
: Description of term 3

Running it again causes another whitespace removal:

Term
: Description of term Term 2
: Description of term 2 Term 3
: Description of term 3

Severity

Goldmark relies on blank lines between description-term and description-details pairs. Formatting a file with mdmft will make all <dl> elements appear malformed upon conversion to HTML.

Version information

Running mdfmt built from be5daf68 compiled with Go 1.17.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.