You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
649 B
Markdown
36 lines
649 B
Markdown
---
|
|
categories: [paige]
|
|
date: "2023-01-02"
|
|
description: Demonstration of the Paige code shortcode.
|
|
tags: [figures, shortcodes]
|
|
title: Code Shortcode
|
|
---
|
|
|
|
Code:
|
|
|
|
```go-text-template
|
|
{{</* paige/code */>}}
|
|
c = 'c = %r; print(c %% c)'; print(c % c)
|
|
{{</* /paige/code */>}}
|
|
```
|
|
|
|
Result:
|
|
|
|
{{< paige/code >}}
|
|
c = 'c = %r; print(c %% c)'; print(c % c)
|
|
{{< /paige/code >}}
|
|
|
|
---
|
|
|
|
```go-text-template
|
|
{{</* paige/code lang="python" caption="Python quine" */>}}
|
|
c = 'c = %r; print(c %% c)'; print(c % c)
|
|
{{</* /paige/code */>}}
|
|
```
|
|
|
|
Result:
|
|
|
|
{{< paige/code lang="python" caption="Python quine" >}}
|
|
c = 'c = %r; print(c %% c)'; print(c % c)
|
|
{{< /paige/code >}}
|