flexmark-java | Markdown Java parser with source level AST | Parser library

 by   vsch Java Version: 0.64.8 License: BSD-2-Clause

kandi X-RAY | flexmark-java Summary

kandi X-RAY | flexmark-java Summary

flexmark-java is a Java library typically used in Utilities, Parser applications. flexmark-java has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, GitLab, Maven.

flexmark-java is a Java implementation of [CommonMark (spec 0.28)] parser using the blocks first, inlines after Markdown parsing architecture. Its strengths are speed, flexibility, Markdown source element based AST with details of the source position down to individual characters of lexemes that make up the element and extensibility. The API allows granular control of the parsing process and is optimized for parsing with a large number of installed extensions. The parser and extensions come with plenty of options for parser behavior and HTML rendering variations. The end goal is to have the parser and renderer be able to mimic other parsers with great degree of accuracy. This is now partially complete with the implementation of [Markdown Processor Emulation] #markdown-processor-emulation). Motivation for this project was the need to replace [pegdown] parser in my [Markdown Navigator] plugin for JetBrains IDEs. [pegdown] has a great feature set but its speed in general is less than ideal and for pathological input either hangs or practically hangs during parsing. optimization of implementation classes. Changes are detailed in [Version-0.60.0-Changes] ../../wiki/Version-0.60.0-Changes).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              flexmark-java has a medium active ecosystem.
              It has 2000 star(s) with 250 fork(s). There are 58 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 117 open issues and 380 have been closed. On average issues are closed in 147 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of flexmark-java is 0.64.8

            kandi-Quality Quality

              flexmark-java has 0 bugs and 0 code smells.

            kandi-Security Security

              flexmark-java has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              flexmark-java code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              flexmark-java is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              flexmark-java releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 145168 lines of code, 12660 functions and 1561 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed flexmark-java and discovered the below as its top functions. This is intended to give you an instant insight into flexmark-java implemented functionality, and help decide if they suit your requirements.
            • Renders an attribute
            • Renders a Paragraph
            • Renders a reference link
            • Renders the macro definition block
            • Renders the blockQuote node
            • Renders an aside block
            • Render the table row
            • Renders an image
            • Renders a table cell
            • Render an image reference
            • Renders the table block
            • Render the given emoji node
            • Render a link
            • Remove this node
            • Resolves a link
            • Transposes the table
            • Pre - processes a block
            • Sets the data in a data holder
            • Render document
            • Try to continue
            • Gets the original ranges
            • Processes the pre - formatted tag
            • Resolves the link
            • Returns the number of elements in this list
            • Parses options into TocOptions
            • Add a footnote to the document
            • Parses the given inline parser
            • Renders the attributes
            • Preprocess a ParagraphBlock
            • Checks whether the given node is syntactic or not
            • Return a MarkdownTable with the given options
            Get all kandi verified functions for this library.

            flexmark-java Key Features

            No Key Features are available at this moment for flexmark-java.

            flexmark-java Examples and Code Snippets

            No Code Snippets are available at this moment for flexmark-java.

            Community Discussions

            QUESTION

            Creating a flexmark extension in Clojure
            Asked 2018-Aug-24 at 04:18

            I'm trying to write a small extension to flexmark. I want to create a custom AttributeProvider and am trying to work through the example shown here.

            My issue is translating two classes into Clojure.

            I've separated the two relevant example classes into separate Java source files and translated the demonstration program into a clojure test.

            The SampleAttributeProvider in Java:

            ...

            ANSWER

            Answered 2018-Aug-24 at 04:18

            You need a forward declaration for the CWikiAttributeProvider as a return value in gen-class. Declare the class in two steps at the top of your file: 1) with constructors only, and 2) with a full declaration including (static) methods and state.

            Source https://stackoverflow.com/questions/51969711

            QUESTION

            How to make Flexmark-Java process "@"-mentions?
            Asked 2018-Aug-10 at 09:41

            When processing markdown, GitHub supports the @-syntax to mention a username or team. How can such mentions be processed with Flexmark-Java? With following code snippet, Hello, @world ! is reported as a single Text node where I would expect to get world reported separately as some kind of MentionsNode:

            ...

            ANSWER

            Answered 2018-Aug-10 at 09:41

            There is a corresponding extension for this:

            Source https://stackoverflow.com/questions/51614707

            QUESTION

            Use flexmark-java to clean markdown
            Asked 2017-Feb-10 at 11:07

            Within a Java application, I would need to convert marked-down text into simple plain text instead of html (for example dropping all links addresses, bold and italic markers).

            Which is the best way to do this? I was thinking using a markdown library like fleaxmark. But I cant find this feature at first sight. Is it there? Are there other better alternatives?

            ...

            ANSWER

            Answered 2017-Feb-10 at 11:07

            Edit

            Commonmark supports rendering to text, by using org.commonmark.renderer.text.TextContentRenderer instead of the default HTML renderer. Not sure what it does with newlines, but worth a try.

            Original answer, using flexmark HTML + JSoup

            The ideal solution would be to implement a custom Renderer for flexmark, but this would force you to write a model-to-string for all language features in markdown. Unless it supports this out of the box, but I'm not aware of this feature...

            A simpler solution may be to use flexmark (or any other lightweight markdown renderer) and let it create the HTML. After that, just run the generated HTML through https://jsoup.org/ and let it extract the text:

            Source https://stackoverflow.com/questions/42144967

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install flexmark-java

            For Maven, add flexmark-all as a dependency which includes core and all modules to the following sample:.

            Support

            I use flexmark-java as the parser for [Markdown Navigator] plugin for JetBrains IDEs. I tend to use the latest, unreleased version to fix bugs or get improvements. So if you find a bug that is a show stopper for your project or see a bug in [github issues page] marked fixed for next release that is affecting your project then please let me know and I may be able to promptly make a new release to address your issue. Otherwise, I will let bug fixes and enhancements accumulate thinking no one is affected by what is already fixed.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/vsch/flexmark-java.git

          • CLI

            gh repo clone vsch/flexmark-java

          • sshUrl

            git@github.com:vsch/flexmark-java.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link