Showcase syntax
Published on Β· Edit on Github Β· llms.txt
π§ͺ Markdown Syntax Showcase
This post demonstrates all supported features of the markdown interpreter.
π¬ Basics
Emoji: π€ π§ Inline code: npm run dev
Math block:
Inline math:
Abbreviation: HTML
HyperText Markup Languageπ¦ Code Blocks
With title, caption, and line numbers
functioncalc(){ consta=1; constb=2; returna+b; }
With highlight, inserted, and deleted lines
highlighted.js
functiongreet(){ console.log('Hello'); } console.log('Newfeature');//inserted console.log('Oldcode');//deleted
With regex and label highlights
constmsg='helloworld'; console.log(msg);
constmessage='HelloWorld'; console.log(message);//printsHelloWorld
constmsg='HelloWorld'; console.log(msg); console.log(msg);//printsHelloWorld
console.log('hewwo'); console.log('hello'); console.log('goodbye');
console.log('Notfocused'); console.log('Focused'); console.log('Notfocused');
console.log('Nothighlighted'); console.log('Highlighted'); console.log('Nothighlighted');
constx=0; constx=0; constx=0;
>pwd /usr/home/boba-tan/programming
const[age,setAge]=useState(50); const[name,setName]=useState('Taylor');
//Allthisboilerplatesetupcodewillbecollapsed import{someBoilerplateEngine}from'@example/some-boilerplate'; import{evenMoreBoilerplate}from'@example/even-more-boilerplate'; constengine=someBoilerplateEngine(evenMoreBoilerplate()); //Thispartofthecodewillbevisiblebydefault engine.doSomething(1,2,3,calcFn); functioncalcFn(){ //Youcanhavemultiplecollapsedsections consta=1; constb=2; constc=a+b; //Thiswillremainvisible console.log(`Calculationresult:${a}+${b}=${c}`); returnc; } //Allthiscodeuntiltheendoftheblockwillbecollapsedagain engine.closeConnection(); engine.freeMemory(); engine.shutdown({reason:'Endofexampleboilerplatecode'});
//ExamplewithhangingIndent=2andpreserveIndent=false functiongetLongString(){ return'Thisisaverylongstringthatwillmostprobablynotfitintotheavailablespaceunlessthecontainerisextremelywide'; } functionheavilyIndentedCode(){ return'Eventhoughthislonglinestartswithalotofindentation,itswrappedpartswillonlybeindentedby2columnsduetothecombinationofhangingIndent=2andpreserveIndent=false'; }
functionthisIsJavaScript(){ //ThisentireblockgetshighlightedasJavaScript, //andwecanstilladddiffmarkerstoit! -console.log('Oldcodetoberemoved') +console.log('Newandshinycode!') }
NoteUseful information that users should know, even when skimming content.
TipHelpful advice for doing things better or more easily.
ImportantKey information users need to know to achieve their goal.
WarningUrgent info that needs immediate user attention to avoid problems.
CautionAdvises about risks or negative outcomes of certain actions.
With diff
+addedline -removedline unchangedline
With frame and wrapping options
echo"Noframehere"
functionlongLine(){ return'Thisisalongstringthatshouldwrapwithpreservedindentation.'; }
π Callouts and Blockquotes
This is a simple blockquote. Check the microtask queue.
NoteThis is a note.
Collapsible warning
Be cautious with async side effects!
π Details and Containers
Click to expand
This is hidden content revealed on click.β Task List
- Emoji support
- Code titles + captions
- Math (inline + block)
- Regex & diff highlighting
- Callouts + collapsible sections
- Containers
-
<abbr>
,<details>
, and<video>
π§ Ultimate Markdown Feature Showcase
1. Headings
H1
H2
H3
H4
H5
H6
2. Text Formatting
Bold
Italic
Bold Italic
Strikethrough
Underline ( HTML)
βMarkdown is for everyone.β β Someone Smart
3. Lists
Unordered
- Item A
- Subitem A.1
- Subitem A.1.a
- Subitem A.1
Ordered
- Step One
- Step Two
- Substep
- Substep
Task List
- Write Markdown
- Test in GitHub
- Profit π°
4. Links and Images
Links
5. Code
Inline
Use printf()
in C.
Block
functiongreet(name){ console.log(`Hello,${name}!`); }
Code with Title (non-standard)
example.py
defhello(): print("HelloWorld")
6. Tables
Feature | Supported | Notes |
---|---|---|
Headings | β | All levels |
Tables | β | Pipe syntax |
Task Lists | β | GitHub / Markdown-it |
Footnotes | β | With proper extensions |
7. Blockquotes and Callouts
NoteThis is a note.
WarningThis is a warning.
8. Footnotes
Markdown supports footnotes1.
9. Math (KaTeX or MathJax)
Inline:
Block:
10. Emoji and Abbreviations
I β€οΈ Markdown.
π β¨ π
Abbr: The HTML standard uses HTML.
11. HTML Support
Click to expand
This is hidden content!
12. Escaping Characters
Use * to escape formatting.
*This will not be italic*
13. Collapsible Sections (GitHub only)
Details
Hidden content with Markdown inside!
Footnotes
Hereβs the footnote content. β©οΈ