ponylang / pony-tutorial

:horse: Tutorial for the Pony programming language
http://tutorial.ponylang.io
BSD 2-Clause "Simplified" License
310 stars 111 forks source link

Custom code fence #555

Open shaedrich opened 3 months ago

shaedrich commented 3 months ago

🚧 Work in progress. Coming soon

Options

Examples

Example 1

```{ .ponylang snippet="hello-world-main.pony" dedent_subsections=false }
Gibberish
* Snippet `hello-world-main.pony` from `./code-samples` is included and content (`"Gibberish"`) is discarded
* Indention is not reduced from the snippet lines

### Example 2
````markdown
```{ .ponylang snippet="classes-wombat.pony:1-3,6" dedent_subsections=false }
Lorem ipsum
* From the snippet `classes-wombat.pony` from `./code-samples` the lines 1 to 3 as well as 6 are included and content (`"Lorem ipsum"`) is discarded
* Indention is not reduced from the snippet lines

### Example 3
````markdown
```{ .ponylang }
actor Main
    new create(env: Env):
        env.out.print("Hello world!")

* Content (`actor Main […]`) is displayed as is
netlify[bot] commented 3 months ago

Deploy Preview for pony-tutorial ready!

Name Link
Latest commit aba775672a0ec9741808d707562438906b641980
Latest deploy log https://app.netlify.com/sites/pony-tutorial/deploys/6661185b8c3b720007a55c78
Deploy Preview https://deploy-preview-555--pony-tutorial.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.