### Install Quarkdown via Shell Script (Linux/macOS) Source: https://github.com/iamgio/quarkdown/blob/main/README.md Use this command to download and execute the installation script for Linux and macOS. It installs Quarkdown to /opt/quarkdown and the wrapper to /usr/local/bin/quarkdown, automatically installing Node.js if needed. ```shell curl -fsSL https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.sh | sudo env "PATH=$PATH" bash ``` -------------------------------- ### Install Quarkdown via Scoop (Windows) Source: https://github.com/iamgio/quarkdown/blob/main/README.md Install Quarkdown using the Scoop package manager on Windows. First, add the Quarkdown bucket, then install the package. ```shell scoop bucket add quarkdown https://github.com/quarkdown-labs/scoop-quarkdown; scoop install quarkdown ``` -------------------------------- ### Install Quarkdown via PowerShell Script (Windows) Source: https://github.com/iamgio/quarkdown/blob/main/README.md Use this command to download and execute the installation script for Windows using PowerShell. ```powershell irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex ``` -------------------------------- ### Generate Quarkdown Documentation Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Run this Gradle task to preview the generated documentation for the standard library. Ensure you have Gradle installed and are in the project's root directory. ```bash gradlew quarkdocGenerate ``` -------------------------------- ### Java Class Example Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/rendering/block/code.html A Java code example. ```java class Point { ... } ``` -------------------------------- ### Function Call Example Source: https://github.com/iamgio/quarkdown/blob/main/README.md Demonstrates how to call a function with arguments and a body in Quarkdown. ```markdown .somefunction {arg1} {arg2} Body argument ``` -------------------------------- ### Get Quarkdown Install Directory Source: https://github.com/iamgio/quarkdown/blob/main/skills/quarkdown/SKILL.md Locates the installation directory for Quarkdown to access bundled documentation and resources. This is a crucial first step for understanding Quarkdown's structure and accessing its API. ```bash QUARKDOWN_INSTALL="$(quarkdown doctor get install-dir)" ``` -------------------------------- ### Create a New Quarkdown Project Source: https://github.com/iamgio/quarkdown/blob/main/README.md Use the `quarkdown create` command followed by a directory name to start a new Quarkdown project. This command launches an interactive wizard to set up metadata and initial content. ```bash quarkdown create [directory] ``` -------------------------------- ### Quarkdown Installation Directory Structure Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md This tree illustrates the layout of the `lib/` directory in a Quarkdown installation, which contains essential runtime resources like library files, agent skills, and HTML rendering assets. ```text / bin/quarkdown docs/ # API reference wiki/ # .qd wiki sources of quarkdown.com/wiki lib/ qd/ # .qd library files (from quarkdown-libs) skills/ # agent skill files (from skills/) html/ lib/ # third-party JS/CSS libraries bootstrap-icons/ highlight.js/ katex/ mermaid/ ... script/ # Quarkdown runtime quarkdown.min.js quarkdown.min.js.map theme/ # compiled CSS themes global.css layout// color// locale// ``` -------------------------------- ### Install Quarkdown via Homebrew (Linux/macOS) Source: https://github.com/iamgio/quarkdown/blob/main/README.md Install Quarkdown using the Homebrew package manager on Linux or macOS. ```shell brew install quarkdown-labs/quarkdown/quarkdown ``` -------------------------------- ### LaTeX Table of Contents, Sections, and Lists Source: https://github.com/iamgio/quarkdown/blob/main/README.md Example of standard LaTeX syntax for creating a table of contents, sections, subsections, and ordered lists with bolded items. ```latex \tableofcontents \section{Section} \subsection{Subsection} \begin{enumerate} \item \textbf{First} item \item \textbf{Second} item \end{itemize} \begin{center} This text is \textit{centered}. \end{center} \begin{figure}[!h] \centering \begin{subfigure}[b] \includegraphics[width=0.3\linewidth]{img1.png} \end{subfigure} \begin{subfigure}[b] \includegraphics[width=0.3\linewidth]{img2.png} \end{subfigure} \begin{subfigure}[b] \includegraphics[width=0.3\linewidth]{img3.png} \end{subfigure} \end{figure} ``` -------------------------------- ### Example of isnone usage Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/isnone.html Demonstrates a direct usage of the isnone function, returning true if the value is 'none'. ```kotlin .none::isnone ``` -------------------------------- ### Code Snippet Example Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/orderedlist.md A basic code snippet example found within a markdown list. ```plaintext Some code ``` -------------------------------- ### Capitalize String Example Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/capitalize.html Demonstrates capitalizing the first character of a string. The function returns a new string with the first character capitalized. ```html
String::capitalize -> String
``` -------------------------------- ### Basic Code Block Example Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/blockquote.md Demonstrates a simple code block within Quarkdown. This is useful for displaying code snippets directly in markdown documents. ```markdown ``` Code ``` ``` -------------------------------- ### HTML Anchor Tag Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/rendering/block/code.html An example of an HTML anchor tag. ```html `` ``` -------------------------------- ### Quarkdown Equivalents for Table of Contents, Sections, and Lists Source: https://github.com/iamgio/quarkdown/blob/main/README.md Demonstrates how to achieve similar document structure elements in Quarkdown as shown in the LaTeX example, including table of contents, sections, subsections, and ordered lists with bolded items. ```markdown .tableofcontents # Section ## Subsection 1. **First** item 2. **Second** item .center This text is _centered_. .row alignment:{spacebetween} ![Image 1](img1.png) ![Image 2](img2.png) ![Image 3](img3.png) ``` -------------------------------- ### Multiline Code Snippet Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/orderedlist.md A multiline code snippet example found within a markdown list. ```plaintext Some multiline code ``` -------------------------------- ### Non-Function Identifier Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Illustrates that identifiers starting with '__' are not treated as functions. ```quarkdown .__notfunction__ {arg1} {arg2} ``` -------------------------------- ### Generate Wiki Documentation via Gradle Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Generate wiki documentation using Gradle. This is an alternative to running the 'quarkdown' command directly. ```bash ./gradlew run --args="c main.qd --clean --strict --allow all" ``` -------------------------------- ### Build Project Distribution Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Use this command to build the project distribution. Avoid using `./gradlew build`. ```bash ./gradlew installDist ``` -------------------------------- ### Compile with Preview and Watch Options Source: https://github.com/iamgio/quarkdown/blob/main/README.md Compile a Quarkdown file with live preview and automatic reloading. The `-p` flag enables preview, and `-w` recompiles on file changes. Combining them provides a live preview experience. ```bash quarkdown c file.qd -p ``` ```bash quarkdown c file.qd -w ``` ```bash quarkdown c file.qd -p -w ``` -------------------------------- ### Function Definition and Call Source: https://github.com/iamgio/quarkdown/blob/main/README.md Shows how to define a custom function 'greet' and then call it with arguments in Quarkdown. ```markdown .function {greet} to from: **Hello, .to** from .from! .greet {world} from:{iamgio} ``` -------------------------------- ### Compile Quarkdown documentation from CLI Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Execute this command from the `docs` folder to compile the documentation website. It uses the `main.qd` file as the entry point and generates output in `docs/output/Quarkdown-Wiki`. ```bash c main.qd --strict --allow all --clean ``` -------------------------------- ### Compile Wiki Documentation Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Compile the wiki documentation from the 'docs' directory. This command is run from within the 'docs' directory. ```bash quarkdown c main.qd --clean --strict --allow all ``` -------------------------------- ### Generate Standard Library Documentation Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Generate Quarkdoc documentation specifically for the standard library using Gradle. ```bash ./gradlew quarkdocGenerate ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Execute all tests in the project. This command runs the complete test suite. ```bash ./gradlew test ``` -------------------------------- ### Live Preview Endpoint Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-server/README.md Wraps HTML files with live preview capabilities. ```APIDOC ## GET /live/[file] ### Description Wraps HTML files with live preview capabilities. ### Method GET ### Endpoint /live/[file] ### Parameters #### Path Parameters - **file** (string) - Required - The HTML file to wrap for live preview. ``` -------------------------------- ### Compile Quarkdown to PDF (Sequential) Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/issues/README.md Use this command to compile all .qd files in the current directory to PDF sequentially. This method is slower but more stable if parallel compilation fails. ```bash for f in *.qd; do quarkdown c "$f" --pdf; done ``` -------------------------------- ### Basic Function with Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Illustrates the standard format for defining a function with two arguments and associated text. ```quarkdown .func {arg1} {arg2} text ``` -------------------------------- ### Compile Mock Document with Preview Source: https://github.com/iamgio/quarkdown/blob/main/README.md Compile the main Quarkdown file of the mock document with the preview option enabled. This is useful for exploring the visual elements and features of Quarkdown. ```bash quarkdown c mock/main.qd -p ``` -------------------------------- ### string Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Creates a string. ```APIDOC ## string ### Description Creates a string. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (String) - The created string. #### Response Example N/A ``` -------------------------------- ### Compile Quarkdown to PDF (Parallel) Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/issues/README.md Use this command to compile all .qd files in the current directory to PDF in parallel. This is generally faster but may cause issues in some environments. ```bash ls *.qd | xargs -P 4 -I {} quarkdown c "{}" --pdf ``` -------------------------------- ### Generate Project-Wide Documentation Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Generate Quarkdoc documentation for the entire Quarkdown project using Gradle. ```bash ./gradlew quarkdocGenerateAll ``` -------------------------------- ### Compile to PDF Source: https://github.com/iamgio/quarkdown/blob/main/README.md Generate a PDF file from your Quarkdown document using the `--pdf` option. ```bash quarkdown c file.qd --pdf ``` -------------------------------- ### Implementing Node Visitor Pattern Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Implement the visitor pattern for custom nodes by overriding the accept method and adding a visit method to the NodeVisitor interface. ```kotlin override fun accept(visitor: NodeVisitor): T = visitor.visit(this) ``` -------------------------------- ### Compile Quarkdown Document Source: https://github.com/iamgio/quarkdown/blob/main/mock/README.md Use this command to compile a Quarkdown file. Add flags like -p to open in browser or --pdf for PDF output. Use -w for live reloading. ```bash quarkdown c mock/main.qd ``` -------------------------------- ### Run Quarkdown CLI via Gradle Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Execute the Quarkdown CLI directly using Gradle without a prior build. Useful for quick CLI testing. ```bash ./gradlew run --args="c [options]" ``` -------------------------------- ### Static Files Endpoint Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-server/README.md Serves static files from the origin directory. ```APIDOC ## GET / ### Description Serves static files from the origin directory. ### Method GET ### Endpoint / ### Parameters None ### Request Example None ### Response #### Success Response (200) - Serves static files. ``` -------------------------------- ### Format Kotlin Code Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Automatically fix code style issues using ktlint. Run this command to format your code. ```bash ./gradlew ktlintFormat ``` -------------------------------- ### Compile Quarkdown File Source: https://github.com/iamgio/quarkdown/blob/main/skills/quarkdown/SKILL.md Compiles a Quarkdown (.qd) file to verify its syntax and identify errors. Use the --strict flag for thorough error checking and --out to direct build artifacts to a temporary location, keeping the user's project directory clean. ```bash quarkdown c
.qd --strict --out /tmp/quarkdown-verify ``` -------------------------------- ### Compile a Quarkdown File Source: https://github.com/iamgio/quarkdown/blob/main/README.md Compile a specified Quarkdown file using `quarkdown c`. The output is saved to a file with the same name. If compiling a project with multiple files, the root file must be used. ```bash quarkdown c file.qd ``` -------------------------------- ### Run Tests for Specific Module Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Run tests for a particular module within the project. Use this for targeted testing. ```bash ./gradlew :quarkdown-core:test ``` ```bash ./gradlew :quarkdown-html:test ``` -------------------------------- ### Block Function Syntax in Quarkdown Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Illustrates the syntax for defining block-level functions in Quarkdown. Block functions can span multiple lines and accept arguments. ```markdown .myfunction {arg1} param:{arg2} arg3 ``` -------------------------------- ### Check Kotlin Code Style Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Run ktlint to check for code style consistency. This is automatically executed on PRs. ```bash ./gradlew ktlintCheck ``` -------------------------------- ### Inline Function Syntax in Quarkdown Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Demonstrates the syntax for defining and using inline functions within Quarkdown documents. Functions can accept named and positional arguments. ```markdown Lorem ipsum .myfunction {arg1} param:{arg2} dolor sit amet. ``` -------------------------------- ### Interactive REPL Mode Source: https://github.com/iamgio/quarkdown/blob/main/README.md Enter an interactive REPL mode with `quarkdown repl` to experiment with Quarkdown syntax and features. ```bash quarkdown repl ``` -------------------------------- ### Live Reload Endpoint Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-server/README.md Handles live reloading for browser clients. ```APIDOC ## GET /reload ### Description Opens a Server-Sent Events stream for live reloading. ### Method GET ### Endpoint /reload ### Parameters None ### Request Example None ### Response #### Success Response (200) - Server-Sent Events stream for live reloading. ``` ```APIDOC ## POST /reload ### Description Broadcasts a reload event to all active subscribers. ### Method POST ### Endpoint /reload ### Parameters None ### Request Example None ### Response #### Success Response (204) - Reload event broadcasted. ``` -------------------------------- ### Function with Three Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Shows a function definition with three arguments, including indentation for the arguments and text. ```quarkdown text text text .func {arg1} {arg2} {arg3} text ``` -------------------------------- ### Parsing Raw Markdown with Function Expansion Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md The parseRaw method, invoked by NodeOutputValueVisitor, uses ValueFactory.blockMarkdown or ValueFactory.inlineMarkdown to parse raw strings as Markdown with function expansion. ```kotlin parseRaw ``` -------------------------------- ### Function with No Space Between Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Demonstrates that arguments can be directly adjacent to each other without spaces. ```quarkdown text .func {arg1}{arg2} text ``` -------------------------------- ### container Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/container.html Creates a general-purpose container that groups content. It allows for customization of width, height, background, border, margin, padding, radius, and text alignment. Any active layout rules inherited from parent elements are reset within this container. ```APIDOC ## container ### Description A general-purpose container that groups content. It resets any active layout rules inherited by the parent (e.g., from [align](align.html), [row](row.html), [column](column.html), [grid](grid.html)) inside this container. ### Method N/A (This is a constructor or factory function, not an HTTP endpoint) ### Parameters #### Optional Parameters - **width** (Size?) - Optional - Width of the container. No constraint if unset. - **height** (Size?) - Optional - Height of the container. No constraint if unset. - **fullwidth** (Boolean) - Optional - Whether the container should take up the full width of the parent. Overridden by [width](container.html). False if unset. - **foreground** (Color?) - Optional - Text color. Default if unset. - **background** (Color?) - Optional - Background color. Transparent if unset. - **border** (Color?) - Optional - Border color. Default if unset and [borderwidth](container.html) is set. - **borderwidth** (Sizes?) - Optional - Border width. Default if unset and [border](container.html) is set. - **borderstyle** (Container.BorderStyle?) - Optional - Border style. Normal (solid) if unset and [border](container.html) or [borderwidth](container.html) is set. Possible values: `normal`, `dashed`, `dotted`, `double`. - **margin** (Sizes?) - Optional - Whitespace outside the content. None if unset. - **padding** (Sizes?) - Optional - Whitespace around the content. None if unset. - **radius** (Sizes?) - Optional - Corner (and border) radius. None if unset. - **alignment** (Container.Alignment?) - Optional - Alignment of the content. Default if unset. Possible values: `start`, `center`, `end`. - **textalignment** (Container.TextAlignment?) - Optional - Alignment of the text. [alignment](container.html) if unset. - **fontsize** (TextTransformData.Size?) - Optional - Font size. - **fontweight** (TextTransformData.Weight?) - Optional - Font weight. - **fontstyle** (TextTransformData.Style?) - Optional - Font style. - **fontvariant** (TextTransformData.Variant?) - Optional - Font variant. - **textdecoration** (TextTransformData.Decoration?) - Optional - Text decoration. - **textcase** (TextTransformData.Case?) - Optional - Text case. - **float** (Container.FloatAlignment?) - Optional - Float alignment. - **fullspan** (Boolean) - Optional - Whether the container should take up the full span. - **classname** (String?) - Optional - CSS class name. - **body** (MarkdownContent?) - Optional - The content of the container, which is a MarkdownContent node. ### Return The new Container node. ``` -------------------------------- ### Function with Argument on New Line Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Shows a function where the first argument appears on the line following the function name. ```quarkdown text .fun {arg1} {arg2} ``` -------------------------------- ### Defining a Custom Function in Flow Stdlib Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Use Flow.function() to create a SimpleFunction and register it in a Library, deriving parameters from the Lambda's explicit parameters. ```kotlin Flow.function() ``` -------------------------------- ### Chained Lowercase Function Call Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/lowercase.html Demonstrates how the lowercase function can be chained with other function calls in Quarkdown syntax. This allows for sequential string transformations. ```kotlin String::lowercase -> String ``` -------------------------------- ### Function with Space Before Dot and Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Shows a function with a space before the identifier and arguments, with leading text. ```quarkdown text text . func {arg1} ``` -------------------------------- ### isempty Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Checks if a string is empty. ```APIDOC ## isempty ### Description Checks if a string is empty. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **boolean** (Boolean) - True if the string is empty, false otherwise. #### Response Example N/A ``` -------------------------------- ### uppercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Converts a string to uppercase. ```APIDOC ## uppercase ### Description Converts a string to uppercase. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (String) - The string converted to uppercase. #### Response Example N/A ``` -------------------------------- ### Function Execution and Output Mapping Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md The function's invoke(bindings, call) method executes the function and returns an OutputValue, which is then mapped to an AST Node by a NodeOutputValueVisitor. ```kotlin call.context ``` -------------------------------- ### Function with Single Argument Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Illustrates a function defined with only one argument, potentially spanning multiple lines. ```quarkdown text text .func{arg1} text ``` -------------------------------- ### lowercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Converts a string to lowercase. ```APIDOC ## lowercase ### Description Converts a string to lowercase. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (String) - The string converted to lowercase. #### Response Example N/A ``` -------------------------------- ### Class Definition Snippet Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/rendering/block/code.html A placeholder for a class definition. ```plaintext `class Point { ... }` ``` -------------------------------- ### Function with Space Before Dot Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Demonstrates that a space before the function identifier is ignored. ```quarkdown . func ``` -------------------------------- ### Function with Indented Argument Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Demonstrates a function where the argument is indented on a new line, followed by text. ```quarkdown .func {arg1} text ``` -------------------------------- ### Function with Spaced Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Shows that arguments can have varying amounts of whitespace between them and the function name. ```quarkdown text .func {arg1} {arg2} ``` -------------------------------- ### Run Playwright E2E Tests Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Execute specific E2E test files in the quarkdown-html module using npx playwright test. This command is useful for speeding up the feedback loop when developing or modifying E2E tests. ```bash cd quarkdown-html && npx playwright test path/to/test.spec.ts ``` -------------------------------- ### Quarkdown Function with Escaped Opening Brace in Argument Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Illustrates how to include a literal opening brace within an argument by escaping it with a backslash. ```quarkdown .function \{arg1} ``` -------------------------------- ### Function with Trailing Text Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/inlinefunction.md Shows a function definition followed by text on the same line. ```quarkdown text text .func {arg1} {arg2} ``` -------------------------------- ### Run End-to-End Tests Source: https://github.com/iamgio/quarkdown/blob/main/CONTRIBUTING.md Execute end-to-end tests for the quarkdown-html module. These are separate from the main test suite. ```bash ./gradlew :quarkdown-html:e2eTest ``` -------------------------------- ### Basic Code Snippet Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/rendering/block/code.html A placeholder for a code snippet. ```plaintext `Code` ``` -------------------------------- ### CSV Data Loading Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-lsp/src/test/resources/docs/com.quarkdown.stdlib.module.Data/csv.html This function loads data from a specified CSV file and displays it as a table. ```APIDOC ## csv ### Description Loads content from a CSV file and displays it as a table. ### Method N/A (This is a function call, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters - **path** (String) - Required - The path to the CSV file (including extension). #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **Node** - Returns a table node whose content is loaded from the specified CSV file. #### Response Example N/A ### Additional Information - The `caption` parameter is optional and can be used to provide a title for the table. It can be a named parameter. - Refer to the [File data](https://github.com/iamgio/quarkdown/wiki/File+data) wiki page for more details. ``` -------------------------------- ### capitalize Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Capitalizes the first character of a string. ```APIDOC ## capitalize ### Description Capitalizes the first character of a string. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (String) - The string with its first character capitalized. #### Response Example N/A ``` -------------------------------- ### Run E2E tests across multiple document types Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Utilize `testMatrix` to execute the same test logic against various document types (e.g., 'plain', 'paged', 'slides'). The runner automatically appends the doctype suffix to the source. This is the only method to specify document types. ```typescript testMatrix(name, docTypes, fn, options?) ``` -------------------------------- ### Convert String to Uppercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/uppercase.html Converts a given string to its uppercase equivalent. This function is chainable with other string operations. ```kotlin String::uppercase -> String ``` -------------------------------- ### uppercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/uppercase.html Converts a string to its uppercase equivalent. This function can be chained with other function calls. ```APIDOC ## uppercase ### Description Converts a string to its uppercase equivalent. ### Method N/A (SDK function) ### Signature `String.uppercase(string: String) -> String` ### Parameters #### Parameters - **string** (String) - The string to convert. ### Return A new string with all characters converted to uppercase. ### Example `"Hello, World!".uppercase() -> "HELLO, WORLD!"` ### Chaining This function supports chaining with other function calls. ``` -------------------------------- ### isnotempty Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Checks if a string is not empty. ```APIDOC ## isnotempty ### Description Checks if a string is not empty. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **boolean** (Boolean) - True if the string is not empty, false otherwise. #### Response Example N/A ``` -------------------------------- ### Basic Code Block Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/fencescode.md A simple code block for displaying code. ```plaintext Code ``` -------------------------------- ### Column Layout Component Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-lsp/src/test/resources/docs/com.quarkdown.stdlib.module.Layout/column.html The 'column' component stacks content vertically within a layout. It accepts parameters for alignment, spacing, and the content to be displayed. ```APIDOC ## column ### Description Stacks content vertically. ### Method N/A (This is a component, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **alignment** (Stacked.MainAxisAlignment?) - Optional - Content alignment along the main axis. Values: `start`, `center`, `end`, `spacebetween`, `spacearound`, `spaceevenly`. - **cross** (Stacked.CrossAxisAlignment?) - Optional - Content alignment along the cross axis. Values: `start`, `center`, `end`, `stretch`. - **gap** (Size?) - Optional - Blank space between children. If omitted, the default value is used. - **body** (MarkdownContent) - Likely a body argument - Content to stack. ### Request Example ```json { "alignment": "center", "cross": "stretch", "gap": "10px", "body": "# My Content" } ``` ### Response #### Success Response (200) - **Node** - The new Stacked node. #### Response Example ```json { "nodeType": "Stacked", "children": [ { "type": "Markdown", "content": "# My Content" } ] } ``` ### Wiki page [Stacks](https://github.com/iamgio/quarkdown/wiki/Stacks) ``` -------------------------------- ### Evaluating Expressions with ValueFactory.eval Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md ValueFactory.eval parses and evaluates a raw string as an expression. It recursively evaluates results that are single-line DynamicValues, excluding multi-line strings intended for lazy evaluation. ```kotlin ValueFactory.eval ``` -------------------------------- ### Defining a Variable in Flow Stdlib Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Use Flow.variable() to define a variable as a function with an optional parameter, enabling both getter and setter functionality. ```kotlin Flow.variable() ``` -------------------------------- ### Inline Function Directive Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/blocks.md Defines an inline directive with arguments. Can be used within text. ```quarkdown .inlinefunction {arg1} {arg2} ``` ```quarkdown .inlinefunction {arg1} {arg2} text ``` ```quarkdown text .inlinefunction text ``` -------------------------------- ### Define a single E2E test case with Playwright Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Use the `test` function provided by the `suite` factory to define individual test cases. The `options` object supports `subpath` for navigating to subdocuments. ```typescript test(name, fn, options?) ``` -------------------------------- ### Quarkdown Function with Three Arguments and Multiline Body Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Defines a function with three arguments and a complex multiline body, demonstrating indentation and content separation. ```quarkdown .function {arg1} {arg2} {arg3} body content body content body content not body ``` -------------------------------- ### Theme Toggling Script Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/lowercase.html This JavaScript code handles theme toggling based on local storage and operating system preferences. It adds or removes the 'theme-dark' class to the HTML element. ```javascript var pathToRoot = "../../"; document.documentElement.classList.replace("no-js", "js"); const storage = localStorage.getItem("dokka-dark-mode") if (storage == null) { const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches if (osDarkSchemePreferred === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } else { const savedDarkMode = JSON.parse(storage) if (savedDarkMode === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } ``` -------------------------------- ### Basic Quarkdown Function Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Defines a basic function with no arguments. The content following the function definition is considered its body. ```quarkdown .function body content ``` -------------------------------- ### Quarkdown Function with Escaped Brace in Argument Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Demonstrates how to include a literal closing brace within an argument by escaping it with a backslash. ```quarkdown .function {arg1\}} ``` -------------------------------- ### Lambda Invocation with Context Forking Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Lambda invocation forks from the parent context and registers lambda parameter functions. It propagates the calling context's libraries for variable resolution within the lambda body. ```kotlin Lambda.invokeDynamic ``` -------------------------------- ### String::lowercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/extract/lowercase.html Converts a string to lowercase. This function takes a string as input and returns a new string with all characters converted to lowercase. It supports chaining with other function calls. ```APIDOC ## String::lowercase ### Description Converts a string to its lowercase representation. This is useful for case-insensitive comparisons or formatting. ### Method N/A (Function Call) ### Endpoint N/A (Function Call) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ``` String::lowercase("Hello, World!") ``` ### Response #### Success Response - **string** (String) - A new string with all characters converted to lowercase. #### Response Example ``` "hello, world!" ``` ### Chaining This function can be chained with other function calls. For example: ``` String::lowercase -> String ``` ``` -------------------------------- ### lowercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/lowercase.html Converts a string to its lowercase representation. This function is designed to be chained with other function calls. ```APIDOC ## lowercase string:String -> String ### Description Converts a string to lowercase. ### Method N/A (SDK function) ### Endpoint N/A (SDK function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (string) - a new lowercase string ### Response Example ```json { "example": "hello, world!" } ``` ### Chaining This function is designed to be chained with other function calls: ``` String::lowercase -> String ``` ``` -------------------------------- ### Fenced Code Block Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/blocks.md Use triple backticks to define fenced code blocks. Specify the language for syntax highlighting. ```markdown Code (fences) ``` -------------------------------- ### Clip Function Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-lsp/src/test/resources/docs/com.quarkdown.stdlib.module.Layout/clip.html The clip function applies a clipping path to its content. It takes a clip type and the content to be clipped. ```APIDOC ## clip Function ### Description Applies a clipping path to its content. ### Method N/A (This is a function call within the Quarkdown syntax, not a traditional HTTP method) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```json { "clip": "circle", "body": "Markdown content to be clipped" } ``` ### Response #### Success Response (200) - **Node** (object) - The new Clipped block #### Response Example ```json { "example": "Node object representing the clipped content" } ``` ### Values - **clip**: `circle` - **body**: Likely a [body argument](https://github.com/iamgio/quarkdown/wiki/syntax-of-a-function-call#block-vs-inline-function-calls) ``` -------------------------------- ### Quarkdown Function with Complex Argument Structure Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Illustrates a function with arguments containing nested and spaced braces, including literal content within braces. ```quarkdown .function {arg{1} arg} { { arg2 } } body content ``` -------------------------------- ### Restrict Function Availability by Document Type Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Specifies that a function is only available for, or not available for, specific document types. An error is raised if the function is called in an incompatible document type. ```kotlin @OnlyForDocumentType ``` ```kotlin @NotForDocumentType ``` -------------------------------- ### Convert String to Lowercase Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/extract/lowercase.html Converts a given string to its lowercase equivalent. This function returns a new string and does not modify the original. ```Quarkdown String::lowercase ``` -------------------------------- ### capitalize Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/capitalize.html Capitalizes the first character of a string. This function is designed to be chained with other function calls. ```APIDOC ## capitalize ### Description Capitalizes the first character of a string. ### Method N/A (SDK function) ### Endpoint N/A (SDK function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```kotlin "hello, world!".capitalize() ``` ### Response #### Success Response - **string** (String) - A new string with the first character capitalized. #### Response Example ```kotlin "Hello, world!" ``` #### Chaining This function can be chained with other function calls: ``` String::capitalize -> String ``` ``` -------------------------------- ### Rename Kotlin Function and Parameter for Quarkdown Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Demonstrates how to use the @Name annotation to rename Kotlin functions and parameters for use in Quarkdown. This allows for different naming conventions between Kotlin (camelCase) and Quarkdown (lowercase). ```kotlin @Name("myfunction") fun myFunction( @Name("myparam") myParam: String ): StringValue { // ... } ``` -------------------------------- ### Quarkdown Function with Multiple Indented Body Lines Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Illustrates a function with a body consisting of multiple indented lines. Subsequent non-indented lines are excluded from the body. ```quarkdown .function body content body content not body ``` -------------------------------- ### concatenate Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/index.html Concatenates two strings if a condition is met. ```APIDOC ## concatenate ### Description Concatenates two strings if a condition is met. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **string** (String) - The concatenated string. #### Response Example N/A ``` -------------------------------- ### Align Content Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-lsp/src/test/resources/html-to-markdown/align.md The align function allows you to align content and text within its parent container. It takes an alignment parameter and the content body. ```APIDOC ## .align alignment: Container.Alignment body: MarkdownContent -> Node ### Description Aligns content and text within its parent. ### Method N/A (Function Signature) ### Endpoint N/A (Function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **Node** (Node) - The new aligned Container node. #### Response Example N/A ### Parameters * **alignment** (Container.Alignment) - Content alignment anchor and text alignment. Values: `start`, `center`, `end`. * **body** (MarkdownContent) - Content to center. ``` -------------------------------- ### Mark Parameter as Likely Named in Quarkdown Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Indicates that a parameter is likely to be named when called from Quarkdown, enabling syntax like `.container width:{100}`. ```kotlin @LikelyNamed ``` -------------------------------- ### Lowercase String Conversion Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/lowercase.html Converts a given string to its lowercase representation. This function is designed for direct use or chaining with other string manipulation functions. ```kotlin string.lowercase(): String ``` -------------------------------- ### Quarkdown Function with Arguments Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Defines a function with two arguments. Arguments are space-separated and enclosed in curly braces. ```quarkdown .function {arg1} {arg2} ``` -------------------------------- ### Define Quarkdown Module in Kotlin Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Defines a Quarkdown module using Kotlin functions. This module should be registered in the main Stdlib file. ```kotlin val Layout: QuarkdownModule = moduleOf( ::container, ::align, ::center, // ... ) ``` -------------------------------- ### Indented Class Definition Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-html/src/test/resources/rendering/block/code.html An indented placeholder for a class definition. ```plaintext `class Point { ... }` ``` -------------------------------- ### ECMAScript 6 Code Snippet Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/fencescode.md A basic ECMAScript 6 code snippet. ```ecmascript 6 let x; ``` -------------------------------- ### Capitalize String Functionality Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/capitalize.html This function capitalizes the first character of a given string. It is designed to be chained with other function calls. ```html

Example: hello, world! -> Hello, world!

``` -------------------------------- ### Quarkdown Function with Whitespace Before Body Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/parsing/functioncall.md Shows that leading whitespace before the body content is ignored. ```quarkdown .function body content ``` -------------------------------- ### Block Function Directive Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-core/src/test/resources/lexing/blocks.md Defines a block-level directive with arguments. The body content is processed after the directive. ```quarkdown .blockfunction {arg1} {arg2} body body body end ``` -------------------------------- ### Chaining isnone with other functions Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/isnone.html The isnone function can be chained with other function calls, returning a Boolean indicating if the value is 'none'. ```kotlin Dynamic::isnone -> Boolean ``` -------------------------------- ### Mark Function for Chained Calls in Quarkdown Source: https://github.com/iamgio/quarkdown/blob/main/CLAUDE.md Indicates that a function is likely to be used in a chained manner via the chain syntax, such as in `.myvar::uppercase`. ```kotlin @LikelyChained ``` -------------------------------- ### isnone Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-quarkdoc-reader/src/test/resources/content/isnone.html Checks if the provided value represents a 'none' value. This function is designed for chaining with other function calls. ```APIDOC ## isnone ### Description Checks whether the input `value` represents a `none` value. This function is often used in call chaining. ### Signature `.isnone value:{Dynamic} -> Boolean` ### Parameters * **value** (Dynamic) - The value to check. ### Returns (Boolean) - `true` if the value is `none`, `false` otherwise. ### See also * [none](none.html) ### Chaining This function supports chaining: `Dynamic::isnone -> Boolean` ``` -------------------------------- ### Align Function Source: https://github.com/iamgio/quarkdown/blob/main/quarkdown-lsp/src/test/resources/docs/com.quarkdown.stdlib.module.Layout/align.html The align function is used to align content and text within its parent container. ```APIDOC ## align ### Description Aligns content and text within its parent. ### Method N/A (This appears to be a function call within a DSL, not a REST API endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```kotlin align(alignment = Container.Alignment.Center) { // Content to be aligned } ``` ### Response #### Success Response (200) - **Node** (Node) - The new aligned Container node. #### Response Example ```json { "type": "Node", "content": "Aligned content" } ``` ### Values #### alignment - **start** (Container.Alignment) - **center** (Container.Alignment) - **end** (Container.Alignment) #### body - **MarkdownContent** (MarkdownContent) - Content to be centered. Likely a [body argument](https://github.com/iamgio/quarkdown/wiki/syntax-of-a-function-call#block-vs-inline-function-calls). ### See also - [container](container.html) ### Wiki page - [Align](https://github.com/iamgio/quarkdown/wiki/Align) ```