Giter Club home page Giter Club logo

Comments (8)

ylian avatar ylian commented on July 17, 2024

Some conversions have to be lossy, such as from text to Markdown. None of the text-to-Markdown converter works reliably. It's better to avoid the whole thing altogether. (In Quiver 1.0, I was actually thinking about having a single text/Markdown cell type, but scraped that because those conversions aren't reliable.)

from quiver.

ylian avatar ylian commented on July 17, 2024

Also, some operations you mentioned are not lossy, e.g., converting a Markdown cell to text. The problem is when you convert it back to Markdown. Ideally "operation * reverse operation = Identity". But because one step is lossy, the whole thing just blows up. Keeping text-only during the conversions is the closest I can get to achieve "operation * reverse operation = Identity".

from quiver.

nschneid avatar nschneid commented on July 17, 2024

Isn't it the case that Markdown allows HTML markup, so anything that can be formatted in text mode can also be formatted in Markdown (but not always uniquely—multiple ways to indicate italics, etc.—and sometimes requiring HTML)?

from quiver.

ylian avatar ylian commented on July 17, 2024

HTML is dirty. Missing tags and everything. That's why conversion isn't reliable.

from quiver.

ylian avatar ylian commented on July 17, 2024

Reopen this now that I have a good HTML to Markdown converter. #95

from quiver.

ylian avatar ylian commented on July 17, 2024

Now that I am revisiting this issue, my opinion on this has changed. I think it's okay to be lossy when converting HTML to Markdown. That's what users expect anyway --- HTML is messy, Markdown is neat, so it's expected to lose some data (not text content, just tags stuff) during conversion.

So the goal for such a converter is not to reproduce the original HTML perfectly with Markdown, but to clean up the original HTML, while keeping important data such as text content, basic formatting.

from quiver.

ylian avatar ylian commented on July 17, 2024

Implemented in 2.2b25:

https://dl.dropboxusercontent.com/u/3445731/Quiver%202.2b25.zip

When converting a Markdown cell to a text cell, Quiver now renders it into HTML. When converting a text cell into Markdown, Quiver now use unmarked to convert HTML to Markdown.

from quiver.

ylian avatar ylian commented on July 17, 2024

This is implemented in Quiver 3.0, released today.

from quiver.

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.