mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Copy react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 (upstream software-mansion/enriched-markdown 766fc0e67) into packages/react-native-enriched-markdown, with patches/react-native-enriched-markdown+1.2.0-nightly-20261014-766fc0e67.patch applied. Nothing else changes in this commit; the package is not a workspace yet. Reproduce: npm pack react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 tar xzf react-native-enriched-markdown-*.tgz mkdir -p t/node_modules && mv package t/node_modules/react-native-enriched-markdown (cd t && git init -q && git apply ../patches/react-native-enriched-markdown+*.patch) diff -r t/node_modules/react-native-enriched-markdown packages/react-native-enriched-markdown The diff is empty.
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
// Display names for code block fence languages, shared by every platform and
|
|
// both markdown flavors so a fence like ```python is labeled identically
|
|
// everywhere. Unlike the highlighting seam this is always compiled; it does
|
|
// not depend on ENRICHED_MARKDOWN_CODE_HIGHLIGHT.
|
|
|
|
namespace Markdown {
|
|
|
|
// Maps a fence info string (for example "python", "js") to a human readable
|
|
// display name ("Python", "JavaScript"). Unknown languages fall back to the
|
|
// lowercased input with the first ASCII letter capitalized. Empty input
|
|
// returns an empty string.
|
|
std::string displayNameForLanguage(const std::string& language);
|
|
|
|
// Maps a fence info string to the canonical tree-sitter grammar id that can
|
|
// highlight it (for example "js" and "jsx" both map to "javascript"), or an
|
|
// empty string when no grammar covers the language. The id is the vendored
|
|
// grammar directory name; whether that grammar is actually compiled into the
|
|
// build is answered separately by findGrammar.
|
|
std::string canonicalGrammarId(const std::string& language);
|
|
|
|
} // namespace Markdown
|