Code Monkey home page Code Monkey logo

html2markdown's Issues

anchor with attribute after href

The existing regular expression for anchor does not match other attributes after href ex:

anchor

you can fix it with this regexp :

@"<a.+?href\s*=\s*'""['""][^>]*>([^<]+)"

Remove DOCTYPES

Things like <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> should be removed

Nested HTML in <blockquote> does't convert properly

<blockquote>
    <p class="right" align="right">
            <em>“Qualquer coisa que possas fazer ou sonhar, podes começá-la. A ousadia encerra em si mesma genialidade, poder e magia.<br />
            Ouse fazer, e o poder lhe será dado!”</em><br />
            <strong>— Johann Wolfgang von Goethe</strong>
    </p>
</blockquote>

Creates

>

            *“Qualquer coisa que possas fazer ou sonhar, podes começá-la. A ousadia encerra em si mesma genialidade, poder e magia.  

            Ouse fazer, e o poder lhe será dado!”*  

            **— Johann Wolfgang von Goethe**

Should be

> *“Qualquer coisa que possas fazer ou sonhar, podes começá-la. A ousadia encerra em si mesma genialidade, poder e magia.  
> Ouse fazer, e o poder lhe será dado!”*  
> **— Johann Wolfgang von Goethe**

Missing method

Getting this error after updating to 1.0.3

System.MissingMethodException : Method not found: 'Void LinqExtensions.EachExtension.Each(System.Collections.Generic.IEnumerable`1<!!0>, System.Action`1<!!0>)'.

Updating LinqExtensions to 0.0.1.14396 fixes it.

Does not handle multiline <pre> tags properly

<pre><code>Install-Package Html2Markdown
</code></pre>

Does not convert properly

<pre><code>var converter = new Converter();
var result = converter.Convert(html);
</code></pre>

Does not convert properly

Line breaks, spaces, tabs...

In html line breaks, spaces, and tabs don't make sense and should be replaced by a single space in markdown.

Html:

<p>
  text
  text
  text
</p>

Markdown:
text text text\r\n\r\n

Modify to use depth first search

Change over the codebase to convert HTML by walking the graph, using depth first search. This will underpin subsequent features.

Convert to Portable Library

Update the project to be a portable class library

  • Convert to portable library
  • Make sure unit tests are working
  • Work out how to do versioning properly
  • Fix build to AppVeyor - including NuGet build

Line breaks kill italics

I have some HTML like this:

<i>Some text</br></i>

It's a strange way of doing it, but I have no control over the HTML. The problem is that this causes the converter to incorrectly render the markdown. It would be nice if elements in between the </i> didn't break it.

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.