Giter Site home page Giter Site logo

mmark-ext's Introduction

MMark Extensions

License BSD3 Hackage Stackage Nightly Stackage LTS CI

Commonly useful extensions for the MMark markdown processor.

Contribution

Issues, bugs, and questions may be reported in the GitHub issue tracker for this project.

Pull requests are also welcome.

License

Copyright © 2017–present Mark Karpov

Distributed under BSD 3 clause license.

mmark-ext's People

Contributors

dependabot[bot] avatar mrkkrp avatar srid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

neongreen srid

mmark-ext's Issues

2 testsuite errors for mmark-ext-0.2.1.2

In the Stackage Nightly build with ghc-8.10.4, seeing some testsuite failures for mmark-ext-0.2.1.2:

      tests/Text/MMark/Extension/TestUtils.hs:26:3: 
      1) Text.MMark.Extension.FontAwesome.fontAwesome, when URI has some other scheme, produces the correct HTML
           expected: "<p><a href=\"https://example.org/\">https://example.org/</a></p>\n"
            but got: "<p><a href=\"https://example.org\">https://example.org</a></p>\n"
    
      To rerun use: --match "/Text.MMark.Extension.FontAwesome/fontAwesome/when URI has some other scheme/produces the correct HTML/
"
    
      tests/Text/MMark/Extension/TableOfContentsSpec.hs:25:7: 
      2) Text.MMark.Extension.TableOfContents.toc works
           expected: "<h1 id=\"lorem-ipsum\">Lorem ipsum</h1>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer varius mi\norci, rhoncus ornare nunc tincidunt nec. Aliquam cursus posuere ornare.\nQuisque posuere euismod nunc, sed pellentesque metus hendrerit eu. Donec\nscelerisque accumsan ante quis interdum. Nullam nec mauris dolor. Lorem\nipsum dolor sit amet, consectetur ....
:
: 

Test suite failure, presumably bumped dependency

I'm not sure which dependency changed, but in Stackage I noticed this failure:

    Failures:

      tests/Text/MMark/Extension/TestUtils.hs:30:10:
      1) Text.MMark.Extension.ObfuscateEmail.obfuscateEmail, when URI has the mailto scheme, produces the correct HTML
           expected: "<p><a class=\"foo\" data-email=\"[email protected]\" href=\"javascript:void(0)\">Enable JavaScript to see this email</a></p>\n"
            but got: "<p><a class=\"foo\" data-email=\"me%40example.org\" href=\"javascript:void%280%29\">Enable JavaScript to see this email</a></p>\n"

      To rerun use: --match "/Text.MMark.Extension.ObfuscateEmail/obfuscateEmail/when URI has the mailto scheme/produces the correct HTML/"

Since this seems to be a non-breaking change, I'm going to temporarily mark this as an expected test failure. If/when you fix the test suite, if you could send a ping so we can change that back that would be great!

mmark 0.0.2 causes test failure for mmark-ext 0.0.1.0

Ping @mrkkrp

  tests/Text/MMark/Extension/CommonSpec.hs:101:
  1) Text.MMark.Extension.Common.toc works

The expected/actual diff is huge so not included here. When I repro'd locally, though, I did notice that the "actual" section had some \n characters which the "expected" section did not.

<!-- expected -->
...
<ul>\n<li><a href=\"#nullam-luctus\">Nullam luctus</a><ul>\n<li><a href=\"#sed-euismod\">Sed euismod</a><ul>\n<li><a href=\"#curabitur-ullamcorper\">Curabitur ullamcorper</a><ul>\n<li><a href=\"#ut-dictum-quis\">Ut dictum quis</a><ul>\n<li><a href=\"#mauris-efficitur\">Mauris efficitur</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><a href=\"#aenean-auctor-nec\">Aenean auctor nec</a></li>\n</ul>
...
<!-- actual -->
...
<ul>\n<li>\n<a href=\"#nullam-luctus\">Nullam luctus</a>\n<ul>\n<li>\n<a href=\"#sed-euismod\">Sed euismod</a>\n<ul>\n<li>\n<a href=\"#curabitur-ullamcorper\">Curabitur ullamcorper</a>\n<ul>\n<li>\n<a href=\"#ut-dictum-quis\">Ut dictum quis</a>\n<ul>\n<li>\n<a href=\"#mauris-efficitur\">Mauris efficitur</a>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<a href=\"#aenean-auctor-nec\">Aenean auctor nec</a>\n</li>\n</ul>
...

Here's how I reproduced locally:

$ stack unpack mmark-ext-0.0.1.0 && cd mmark-ext-0.0.1.0
$ vi stack.yaml # added the following stack.yaml
$ stack test
# stack.yaml
resolver: nightly-2017-12-07
extra-deps:
- mmark-0.0.2.0

test failure with hashable < 1.3.1.0

cabal test --constraint 'hashable<1.3.1.0'

      1) Text.MMark.Extension.ObfuscateEmail.obfuscateEmail, when URI has the mailto scheme, produces the correct HTML
           expected: "<p><a href=\"javascript:void(0)\" data-email=\"[email protected]\" class=\"foo\">Enable JavaScript to see this email</a></p>\n"
            but got: "<p><a href=\"javascript:void(0)\" class=\"foo\" data-email=\"[email protected]\">Enable JavaScript to see this email</a></p>\n"

      To rerun use: --match "/Text.MMark.Extension.ObfuscateEmail/obfuscateEmail/when URI has the mailto scheme/produces the correct HTML/"

I'm not sure what is going on here. https://www.stackage.org/nightly-2021-03-14 uses hashable-1.3.0.0, mmark-ext-0.2.1.3, mmark-0.0.7.2. Did some other dependency get updated to cause this?

Tests fail

This package fails to build with nix, which also makes mmark fail, and thus rib, and thus my website. Here is the output of cabal test:

Failures:

  tests/Text/MMark/Extension/TestUtils.hs:30:3: 
  1) Text.MMark.Extension.LinkTarget.linkTarget, when link title starts with a target, when there is nothing but the target in title, works as intended, no title attribute produced
       expected: "<p><a href=\"/url\" target=\"_blank\">link</a></p>\n"
        but got: "<p><a target=\"_blank\" href=\"/url\">link</a></p>\n"

  To rerun use: --match "/Text.MMark.Extension.LinkTarget/linkTarget/when link title starts with a target/when there is nothing but the target in title/works as intended, no title attribute produced/"

  tests/Text/MMark/Extension/TestUtils.hs:30:3: 
  2) Text.MMark.Extension.LinkTarget.linkTarget, when link title starts with a target, when there is also a title, works as intended, target is stripped from the title
       expected: "<p><a href=\"/url\" title=\"something\" target=\"_blank\">link</a></p>\n"
        but got: "<p><a target=\"_blank\" href=\"/url\" title=\"something\">link</a></p>\n"

  To rerun use: --match "/Text.MMark.Extension.LinkTarget/linkTarget/when link title starts with a target/when there is also a title/works as intended, target is stripped from the title/"

  tests/Text/MMark/Extension/TestUtils.hs:30:3: 
  3) Text.MMark.Extension.ObfuscateEmail.obfuscateEmail, when URI has the mailto scheme, produces the correct HTML
       expected: "<p><a href=\"javascript:void(0)\" data-email=\"[email protected]\" class=\"foo\">Enable JavaScript to see this email</a></p>\n"
        but got: "<p><a class=\"foo\" data-email=\"[email protected]\" href=\"javascript:void(0)\">Enable JavaScript to see this email</a></p>\n"

  To rerun use: --match "/Text.MMark.Extension.ObfuscateEmail/obfuscateEmail/when URI has the mailto scheme/produces the correct HTML/"

Randomized with seed 1167889213

Finished in 0.4321 seconds
39 examples, 3 failures

Test suite tests: FAIL
Test suite logged to:
/home/jon/Code/mmark-ext/dist-newstyle/build/x86_64-linux/ghc-8.10.7/mmark-ext-0.2.1.3/t/tests/test/mmark-ext-0.2.1.3-tests.log
0 of 1 test suites (0 of 1 test cases) passed.
cabal: Tests failed for test:tests from mmark-ext-0.2.1.3.

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.