Skip to content

Commit e504c14

Browse files
committed
feat: add v1.1 features showcase example
- Add v1.1-new-features.osf in getting-started/ - Demonstrate strikethrough syntax (~~text~~) - Show ordered lists (1. 2. 3.) - Show blockquotes (> text) - Show code blocks with syntax highlighting - Include real-world pricing update example - Document security improvements - Provide usage instructions Fixes P2-2: Examples now showcase all v1.1 capabilities
1 parent 73078ae commit e504c14

File tree

1 file changed

+155
-0
lines changed

1 file changed

+155
-0
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
// File: getting-started/v1.1-new-features.osf
2+
// What: Showcase all new v1.1 formatting features
3+
// Why: Help users discover strikethrough, ordered lists, blockquotes, code blocks
4+
// RELEVANT FILES: ../README.md, parser README
5+
6+
@meta {
7+
title: "OmniScript v1.1 - New Features Showcase";
8+
author: "OmniScript Team";
9+
date: "2025-01-16";
10+
version: "1.1";
11+
}
12+
13+
@doc {
14+
# Welcome to OmniScript v1.1!
15+
16+
This document showcases all the **new formatting capabilities** added in version 1.1.
17+
18+
## What's New in v1.1
19+
20+
We've added powerful new formatting options while maintaining **100% backward compatibility** with v1.0.
21+
}
22+
23+
@slide {
24+
title: "โœจ New Text Formatting";
25+
26+
Text styling now includes strikethrough:
27+
28+
- **Bold text** for emphasis
29+
- *Italic text* for subtlety
30+
- __Underlined text__ for highlights
31+
- ~~Strikethrough text~~ for deletions
32+
33+
> Perfect for showing price changes, corrections, and revisions!
34+
}
35+
36+
@slide {
37+
title: "๐Ÿ“ Ordered Lists";
38+
39+
Create numbered lists with automatic sequencing:
40+
41+
1. First step - Plan your document
42+
2. Second step - Write in OSF format
43+
3. Third step - Export to your target format
44+
4. Fourth step - ~~Manually format~~ Enjoy automatic formatting!
45+
46+
> Ordered lists make instructions crystal clear.
47+
}
48+
49+
@slide {
50+
title: "๐Ÿ’ฌ Blockquotes";
51+
52+
Emphasize important information with blockquotes:
53+
54+
> "OmniScript has transformed how we handle documentation.
55+
> The new v1.1 features make it even better!"
56+
> โ€” Sarah Chen, Technical Writer
57+
58+
Perfect for:
59+
- Customer testimonials
60+
- Important warnings
61+
- Featured quotes
62+
- Key takeaways
63+
}
64+
65+
@slide {
66+
title: "๐Ÿ’ป Code Blocks";
67+
68+
Display code with proper formatting and syntax highlighting:
69+
70+
```typescript
71+
import { parse, serialize } from 'omniscript-parser';
72+
73+
const doc = parse(osfContent);
74+
const output = serialize(doc);
75+
```
76+
77+
Supports all major languages with preserved indentation!
78+
}
79+
80+
@slide {
81+
title: "๐ŸŽฏ Real-World Example";
82+
83+
## Product Pricing Updates
84+
85+
Our pricing has been optimized:
86+
87+
1. ~~Starter Plan: $29/month~~ **Now $19/month**
88+
2. ~~Pro Plan: $99/month~~ **Now $79/month**
89+
3. Enterprise: Contact sales *(no change)*
90+
91+
> "Best value in the market!" - Industry Analyst
92+
93+
Implementation code:
94+
95+
```javascript
96+
const pricing = {
97+
starter: 19, // was 29
98+
pro: 79 // was 99
99+
};
100+
```
101+
}
102+
103+
@slide {
104+
title: "๐Ÿ” Security Improvements";
105+
106+
v1.1 also includes important security enhancements:
107+
108+
- โœ… HTML XSS prevention (all output sanitized)
109+
- โœ… Unterminated string detection
110+
- โœ… Enhanced input validation
111+
112+
Your documents are safer than ever!
113+
}
114+
115+
@doc {
116+
## Unicode Support
117+
118+
v1.1 adds full unicode escape sequence support:
119+
120+
- Checkmarks: โœ“ โœ” โœ— โœ˜
121+
- Arrows: โ†’ โ† โ†‘ โ†“
122+
- Symbols: ยฉ ยฎ โ„ข โ‚ฌ
123+
- Emoji: ๐ŸŽ‰ ๐Ÿš€ โœจ ๐Ÿ”’
124+
125+
All these characters serialize correctly and maintain fidelity through parse/serialize cycles.
126+
127+
## Position Tracking
128+
129+
Error messages now pinpoint exact locations:
130+
131+
```
132+
Error: Missing closing } for block meta at 15:42
133+
Error: Expected identifier starting with a letter at 8:5
134+
Error: Invalid number format at 12:18
135+
```
136+
137+
Makes debugging **10x faster**!
138+
139+
## Try It Yourself
140+
141+
Use this document to test all v1.1 features:
142+
143+
```bash
144+
# Render to HTML with new formatting
145+
osf render v1.1-new-features.osf --output showcase.html
146+
147+
# Export to Markdown with preserved formatting
148+
osf export v1.1-new-features.osf --target md --output showcase.md
149+
150+
# Generate PDF with all features
151+
osf render v1.1-new-features.osf --format pdf --output showcase.pdf
152+
```
153+
154+
Happy documenting with OmniScript v1.1! ๐Ÿš€
155+
}

0 commit comments

Comments
ย (0)