Skip to content

Add app icon and richer demo for MarkdownEngineDemo#30

Merged
luca-chen198 merged 2 commits into
mainfrom
20-update-logo-on-demo-project
May 18, 2026
Merged

Add app icon and richer demo for MarkdownEngineDemo#30
luca-chen198 merged 2 commits into
mainfrom
20-update-logo-on-demo-project

Conversation

@Nicolas-Py
Copy link
Copy Markdown
Collaborator

Summary

  • Adds an Icon Composer app icon (MDE.icon) to the demo target so it shows up in the Dock and app switcher when the demo runs.
  • Wires MarkdownEngineCodeBlocks and MarkdownEngineLatex into the demo target and plugs the bundled HighlighterSwiftBridge / SwiftMathBridge in via #if canImport(...), so the demo finally shows what the engine can render end-to-end.
  • Replaces the four-line sampleMarkdown with a dynamic composition. Each feature section (inline formatting, block math, code) either showcases its bridge or, if the matching product isn't linked, falls back to a short note linking to the README section that explains how to enable it.

Closes

Closes #20.

Test plan

  • Open Demo/MarkdownEngineDemo.xcodeproj in Xcode 26+ and Run. Confirm the new icon appears in the Dock and in the app switcher.
  • Confirm the editor opens with the long sample markdown: bold/italic/inline-code render live, both block-math equations render via SwiftMath, and the Swift + JSON fenced blocks render with HighlighterSwift colors (light/dark switching with system appearance).
  • Remove MarkdownEngineLatex from the demo target's Package Dependencies and rebuild — the demo should still compile, the inline-math sentence should be gone, and a ## LaTeX section should appear linking to the README. Re-add it before merging.
  • Same drill with MarkdownEngineCodeBlocks — the ## Code section should fall back to a plain-monospace let greeting = "Hello, world!" block with a README link. Re-add it before merging.

Adds MarkdownEngineCodeBlocks and MarkdownEngineLatex as opt-in product
dependencies on the demo target, plugs the bundled bridges in via
#if canImport, and rebuilds the sample markdown as a dynamic composition
so each feature section either showcases the bridge or links to the
README section that explains how to enable it.
@Nicolas-Py Nicolas-Py linked an issue May 16, 2026 that may be closed by this pull request
@Nicolas-Py Nicolas-Py requested a review from luca-chen198 May 16, 2026 19:05
@Nicolas-Py
Copy link
Copy Markdown
Collaborator Author

@luca-chen198 can you pls review the conditional md demo. It should now autoswitch based on configuration.

@Nicolas-Py Nicolas-Py marked this pull request as ready for review May 17, 2026 07:59
Copy link
Copy Markdown
Collaborator

@luca-chen198 luca-chen198 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gj

@luca-chen198 luca-chen198 merged commit 5b100ac into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update logo on Demo project

2 participants