💾 Archived View for gemini.freeradical.zone › log › files › gemini.gcemode captured on 2021-12-05 at 23:47:19.

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

{
    “name”: “gemini”,
    “ext”: [“gmi”, “gemini”],
    “tokenizer”: [
        {	
            “state”: “start”,
            “parse”: [
                // Stateless tokens
                {
                    // Heading Lines
                    “token”:”def”,
                    “regex”:”\\#.*”,
                    “onlyOnLineStart”: true,
                },
                {
                    // Unordered list items
                    “token”: “property”,
                    “regex”: “\\*.*”,
                    “onlyOnLineStart”: true,
                },
                // Stateful tokens
                {
                    // Preformatted text
                    “token”: “operator”,
                    “regex”: “```”,
                    “onlyOnLineStart”: true,
                    “stateAfterMatch”: “preformatted_text”,
                },
                {
                    // Link lines
                    “token”: “operator”,
                    “regex”: “=>”,
                    “onlyOnLineStart”: true,
                    “stateAfterMatch”: “url”,
                }
            ]
        },
        {
            “state”: “preformatted_text”,
            “parse”: [
                {
                    // End of preformatted text
                    “token”: “operator”,
                    “regex”: “```”,
                    “onlyOnLineStart”: true,
                    “stateAfterMatch”: “start”,
                },
                {
                    // Inside the preformatted text
                    “token”: “comment”,
                    “regex”: “.*”,
                }
            ]
        },
        {
            “state”: “url”,
            “parse”: [
                {
                    // If there’s a space after the text, then move on to the link name
                    “token”: “variable”,
                    “regex”: “.+?\\s”,
                    “stateAfterMatch”: “link_name”,
                },
                {
                    // Otherwise treat the rest of the line line a URL
                    “token”: “variable”,
                    “regex”: “.*$”,
                    “stateAfterMatch”: “start”,
                }
            ]
        },
        {
            “state”: “link_name”,
            “parse”: [
                {
                    // The second, optional component of a link line
                    “token”: “variable-3”,
                    “regex”: “.*$”,
                    “stateAfterMatch”: “start”,
                }
            ]
        }
    ]
}