Code Monkey home page Code Monkey logo

Comments (12)

graffic avatar graffic commented on August 27, 2024

+1

from dillinger.

nikosd avatar nikosd commented on August 27, 2024

+1

from dillinger.

joemccann avatar joemccann commented on August 27, 2024

Pull requests accepted! =)

This would require a clientside version of github flavored markdown and a node module. They may both exist and if so let me know and I'll add them.

from dillinger.

eirc avatar eirc commented on August 27, 2024

Touchée! Will investigate and maybe start implementing (and learn to node.js) tomorrow. Open Source, fuck yeah!

from dillinger.

joemccann avatar joemccann commented on August 27, 2024

Sounds good!

from dillinger.

eirc avatar eirc commented on August 27, 2024

So... It would seem that your app does support GFM (at least most of it).

These features have been implemented within showdown.js for the GFM preview page (repo) and you can see them in your showdown.js tagged with GFM.

However the dev candy features of Fenced code blocks and Syntax highlighting were never implemented and probably never will as they later on deprecated the live preview in favor of the preview link wherever markdown is available, which is rendered server-side. Also these features are not implemented in github_markdown_preview, another project which uses the same showdown.js, either.

So back to square one: no existing implementation, should either patch showdown.js or make a new node module.

from dillinger.

joemccann avatar joemccann commented on August 27, 2024

Thanks for the update. Shall I go ahead and close? Or do you think you may be working on a patch?

from dillinger.

eirc avatar eirc commented on August 27, 2024

I'll close for now, will reopen (or open another more specific one) by next week should I have time to spare.

from dillinger.

millermedeiros avatar millermedeiros commented on August 27, 2024

so, after addyosmany twit today and also mathiasbynens twit I ended up hacking some simple code to add syntax highlight and fenced code blocks support, should be trivial to merge this kind of change.

I know that the syntax support will need more patches since highlight.js doesn't understand js as a language, only javascript - a simple dictionary should be able to translate all the alias to the proper language names tho...

anything else missing?

from dillinger.

millermedeiros avatar millermedeiros commented on August 27, 2024

just reminded about another thing, GFM nowadays is different from the parser that GitHub uses to parse README.md files, newlines are treated differently (README files you can hard wrap lines, on comments preview you can't). I had to edit showdown on mdoc to avoid line breaks.

from dillinger.

joemccann avatar joemccann commented on August 27, 2024

Cool! Did you commit this to showdown or do you have fork somewhere?

from dillinger.

millermedeiros avatar millermedeiros commented on August 27, 2024

I haven't forked it, I just did the replacements before running showdown (for the code blocks) and commented the line that adds the line breaks... The proper way of doing it would be to fork showdown and add some configuration support to it, but since I hacked the mdown live preview in <30min and mdoc in less than 1 day I didn't really spent too much time doing things the "right way".

from dillinger.

Related Issues (20)

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.