Giter VIP home page Giter VIP logo

elm-markdown's Introduction

elm-markdown's People

Contributors

eeue56 avatar ento avatar evancz avatar jvoigtlaender avatar process-bot avatar sabine avatar taiju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elm-markdown's Issues

Error generated from reading a string from an external file

I created a native lib to read a .md file convert to string and the elm-markdown convert to HTML.

output is "# teste"
the typeof output is a string

when i use Markdown.toHtml [] variablewithstring i have:

(index):14120 Uncaught TypeError: src.replace is not a function
Please report this to https://github.com/chjj/marked.
at Lexer.lex ((index):14120)
at Function.Lexer.lex ((index):14120)
at marked ((index):14120)
at Object.render ((index):14079)
at render ((index):7811)
at (index):8984
at Object.callback ((index):2414)
at step ((index):3058)
at work ((index):3116)
Lexer.lex @ (index):14120
Lexer.lex @ (index):14120
marked @ (index):14120
render @ (index):14079
render @ (index):7811
(anonymous) @ (index):8984
(anonymous) @ (index):2414
step @ (index):3058
work @ (index):3116

Provide customization for code block rendering

Some thoughts are already in this message on the mailing list. Additionally, you could provide a means for the programmer to turn on auto-highlighting, where the highlight.js library's facility for detecting languages is used. That is, Markdown.Options could include an option to turn on such auto-detection, and then in these lines, when no explicit lang tag was given, but the programmer has turned on auto-detection, you could use something like hljs.highlightAuto(code).value instead of hljs.highlight(lang, code, true).value.

Markdown not updating

I originally posted this on the elm-discuss mailing list and was told this was a bug, so I'm reporting it here.

This code works fine:

import Markdown
import Time (..)
import Signal (Signal, (<~))
import Graphics.Element (Element)
import Text (..)

main : Signal Element
main = display <~ (every second)

display : Time -> Element
display time = plainText <| toString time

But when I change the plainText to Markdown.toElement the time no longer updates:

import Markdown
import Time (..)
import Signal (Signal, (<~))
import Graphics.Element (Element)
import Text (..)

main : Signal Element
main = display <~ (every second)

display : Time -> Element
display time = Markdown.toElement <| toString time

I tested this locally but also on the editor on the Examples page. In the actual project where I ran into this issue, the text didn't change, but it looked like the width was changing.

Github tables are not properly rendered

I happens with any table. It's not a marked issue, since I tried the same tables directly with marked.
Tests done with:
elm-markdown
marked 0.3.3

I'd figure out by myself what's going on, but right now I don't know how to use a Elm package without using elm-pagage (i.e. use a package in development mode).

Any Plan to update for 0.19?

Hi Evan, Do you have a plan to update it for 0.19? this is the only package blocking us from migrating.

Many thanks!

Type Html.Html has too few arguments.

options : Options
options =
    {defaultOptions | sanitize = True}

toMarkdown : String -> Html
toMarkdown userInput =
    toHtmlWith options [class "recip"] userInput

This code is presented in the "Markdown.elm" file in comment, but it doesn't work. It gives the error cited in title.

The following code works:

options : Options
options =
    {defaultOptions | sanitize = True}

toMarkdown : String -> Html msg
toMarkdown userInput =
    toHtmlWith options [class "recip"] userInput

Sorry for my English and thank you in advance.

Add emoji-support

I have a use-case where emoticons would be nice to have ๐Ÿ˜€
In fact, all use-cases could need a little more flare โœจ

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.