Giter VIP home page Giter VIP logo

Comments (13)

lruiz avatar lruiz commented on May 27, 2024

For something like pretty print ?

from markdownpapers.

yegor256 avatar yegor256 commented on May 27, 2024

For something like emails, for example. I have a markdown text which I render in web and also send by email. I want to use HTML in web and plain text in emails.

from markdownpapers.

spiffygit avatar spiffygit commented on May 27, 2024

I have exactly the same requirement. I'm going to give MarkdownPapers a go for web rendering but if it had a plain text emitter too that would be excellent.

from markdownpapers.

lruiz avatar lruiz commented on May 27, 2024

Ok, I'm going to write some initial code

from markdownpapers.

dplassgit avatar dplassgit commented on May 27, 2024

Why not just "emit" the original text?

from markdownpapers.

spiffygit avatar spiffygit commented on May 27, 2024
  1. because some markup, such as the notation for hyperlinks, isn't very end-user-friendly
  2. because some things, such as laying out tables, needs to be done with HTML

We wrote our own HTML emitter but it's a quick hack, just good enough for our own needs and not supporting all the features of markdown. Hopefully the code Iruiz is working on will be a proper implementation.

from markdownpapers.

dplassgit avatar dplassgit commented on May 27, 2024
  1. Markdownpapers doesn't support tables. See issue #33

"HTML emitter" - might as well use the regular emitter, no?

from markdownpapers.

spiffygit avatar spiffygit commented on May 27, 2024

You're right, that makes no sense, sorry - I meant to write "our own plain text emitter"..

from markdownpapers.

jbyler avatar jbyler commented on May 27, 2024

I suppose it's all a matter of taste, but it seems as though a plain text emitter is counter to the spirit of markdown; the whole point is that the markup is supposed to look clean and legible as-is, like a hand-written plain-text email. I personally find this markup hyperlink style to be quite readable: [sample linked text] 1. I can't think of a cleaner way to represent a hyperlink in plain text than the markdown source, if you use that style with the URL set up like a footnote.

from markdownpapers.

lruiz avatar lruiz commented on May 27, 2024

I like this idea of footnotes

from markdownpapers.

jbyler avatar jbyler commented on May 27, 2024

In case it's not clear: the footnote style links are already supported markdown. I was just suggesting that a PlainTextEmitter isn't really necessary; instead users can just create their markup source to look how they want it to. I recommend the footnote style as the most readable links.

from markdownpapers.

lruiz avatar lruiz commented on May 27, 2024

Well, I though PlainTextEmitter could be use as a prettyfier too, but don't know.

from markdownpapers.

spiffygit avatar spiffygit commented on May 27, 2024

Footnote style links look OK as long as there aren't many of them, and the block of text they're in isn't very long. Otherwise they're a lot less readable than inline links.

The table problem is still the killer reason why we use our plain text emitter. (We have a client who has price tables which need to appear on the web and in plain text, from the same source.) This and anything else which isn't supported by Markdownpapers requires you to use HTML for the web version, which needs to be stripped out for the plain text version.

It would be nice if a plain text emitter also did prettifying like filling lines of text to a given width. Just because markdown is "human readable" doesn't mean it's necessarily "pretty".

from markdownpapers.

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.