mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
This implements a new `layout.label_markdown(text="...")` function which supports drawing a subset of Markdown in the Blender UI. The original motivation for this was to support markdown in a new Comment node (#163168). However, the functionality is more useful more generally. For example it could be used to draw extension descriptions or maybe tooltips in the future etc. It uses the [md4c](https://github.com/mity/md4c) library for the actual markdown parsing. It has the MIT license. It's a very simple to integrate C library, just on .c and one .h file. The following markdown features are supported currently: * Headers * Paragraphs * Bold/italics/monospace text * Clickable links * Code blocks * Inline code Intentionally omitted: * Tables: Could be added later. * Images: Could be added later, but needs design regarding internet access. * Footnotes: Could be added later if needed. * Latex math Could be added but requires more work to render such text in the first place. * Underlined and striked through text: Could be added if our font system supports it. * Syntax highlighting in code blocks: Could be added later. * Raw HTML: Unlikely that this will be supported. All the various margins etc. are hard-coded but there is a UI to be able to find the right values by using `4002` in the `Debug Menu`. The settings could be theme settings but it seems overkill to add that many right now. Pull Request: https://projects.blender.org/blender/blender/pulls/163254 |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| LICENSE | ||
| md4c.c | ||
| md4c.h | ||
| README.blender | ||
Project: MD4C URL: https://github.com/mity/md4c License: SPDX:MIT Copyright: "Copyright (c) 2016-2024 Martin Mitáš" Upstream version: 0.5.3 (472c417, 2026-04-20) Local modifications: * None