Git Product home page Git Product logo

markdown-parse's People

Contributors

catfish47 avatar jpolitz avatar

Watchers

James Cloos avatar

markdown-parse's Issues

Check for spaces, parentheses, and brackets inside the link

Consider the following line of markdown code: [link](((((((( (((goog le3.com)

Your code treats everything between the first open parentheses and the closing parentheses as a valid link,
when spaces and parentheses are generally not allowed inside links.

Your output for the test file: [((((((( (((goog le3.com]

To fix this, check the string between openParen and closeParen for any spaces and parentheses, and if there are any, set currentIndex to the index after closeParen and continue checking for links there.

Check to see that nextCloseBracket is right next to openParen

In MarkdownParse.java, you make the following check.

When running your code with the following test file:

some text here

[link]]]]]]]]]]](google2.com)

your code outputs the following: [google2.com]

To fix this, you should check if nextCloseBracket is the character before openParen,
with a line like the following: openParen - 1 != nextCloseBracket.

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.