You should know that this markdown is being pulled from a GitHub gist - which means you can edit your docs outside your model and update them without having to re-release the model 🎉
This is a custom UI component with renders markdown (albeit, markdown horribly written into a JavaScript file) as HTML in the UI only.
This means no assigning big chunks of text to nodes in your hxd in order to see docs!
This CUIC uses:
- marked.js to render the markdown to HTML
- DOMPurify for HTML sanitation
- PrismJS for syntax highlighting
With syntax highlighting, and copy to clipboard buttons.
# Simple list comprehension and function
numbers = [1, 2, 3, 4, 5]
squares = [x**2 for x in numbers]
def greet(name):
return f"Hello, {name}!"
print(greet("World"))
print(squares)function Welcome({ name }) {
const [count, setCount] = useState(0);
return (
<div>
<h1>Hello, {name}!</h1>
<button onClick={() => setCount(count + 1)}>Count: {count}</button>
</div>
);
}| City | Country | Population (metro area) | Founded | Notable Feature |
|---|---|---|---|---|
| Tokyo | Japan | ~37 million | 1457 (as Edo) | World's largest metropolitan area |
| Paris | France | ~12 million | 3rd century BC | Home to the Eiffel Tower and Louvre Museum |
| Cairo | Egypt | ~20 million | 969 AD | Nearby ancient pyramids of Giza |
| Canberra | Australia | ~460,000 | 1913 | Purpose-built capital city designed by Walter Burley Griffin |
I am slightly indented and more important than the things around me.