All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pkl.thirdparty.commonmark.parser.beta.LinkInfo Maven / Gradle / Ivy

Go to download

Fat Jar containing pkl-cli, pkl-codegen-java, pkl-codegen-kotlin, pkl-config-java, pkl-core, pkl-doc, and their shaded third-party dependencies.

There is a newer version: 0.27.1
Show newest version
package org.pkl.thirdparty.commonmark.parser.beta;

import org.pkl.thirdparty.commonmark.node.Text;

/**
 * A parsed link/image. There are different types of links.
 * 

* Inline links: *

 * [text](destination)
 * [text](destination "title")
 * 
*

* Reference links, which have different subtypes. Full:: *

 * [text][label]
 * 
* Collapsed (label is ""): *
 * [text][]
 * 
* Shortcut (label is null): *
 * [text]
 * 
* Images use the same syntax as links but with a {@code !} {@link #marker()} front, e.g. {@code ![text](destination)}. */ public interface LinkInfo { /** * The marker if present, or null. A marker is e.g. {@code !} for an image, or a custom marker as specified in * {@link org.pkl.thirdparty.commonmark.parser.Parser.Builder#linkMarker}. */ Text marker(); /** * The text node of the opening bracket {@code [}. */ Text openingBracket(); /** * The text between the first brackets, e.g. `foo` in `[foo][bar]`. */ String text(); /** * The label, or null for inline links or for shortcut links (in which case {@link #text()} should be used as the label). */ String label(); /** * The destination if available, e.g. in `[foo](destination)`, or null */ String destination(); /** * The title if available, e.g. in `[foo](destination "title")`, or null */ String title(); /** * The position after the closing text bracket, e.g.: *
     * [foo][bar]
     *      ^
     * 
*/ Position afterTextBracket(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy