this post was submitted on 17 Mar 2024
1 points (100.0% liked)

Testing Zone

17 readers
1 users here now

A zone to test posts and comments in the instance

Hidden from the feeds in the instance by default. Subscribe to the community to see posts in it

If youre an instance owner and this is showing up on your feed I can show you how to hide it or you can delete it if you want

CreditsIcon base by Lorc under CC BY 3.0 with modifications to add a gradient


founded 1 year ago
MODERATORS
 

Single line of code: [4 spaces and an escaped newline]
return [4 spaces and an escaped newline]
New paragraph [2 escaped newlines]

Code Block (no lang): [4 spaces and an escaped newline]

if this [4 spaces and an escaped newline]    
then [4 spaces and an escaped newline]    
that
else
the_other_thing [4 spaces and an escaped newline]    
endif

(no spaces before newlines for next block)

Code Block (python):

if this is not None:
    that
else:
    other_thing
top 18 comments
sorted by: hot top controversial new old
[–] freamon 1 points 8 months ago

Assume follow worked

[–] freamon 1 points 8 months ago
{
  "actor": "https://programming.dev/c/test",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "object": {
    "id": "https://programming.dev/activities/create/5a782f4a-c892-4eeb-abca-05127db50929",
    "actor": "https://endlesstalk.org/u/freamon",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "object": {
      "type": "Page",
      "id": "https://endlesstalk.org/post/27782033",
      "attributedTo": "https://endlesstalk.org/u/freamon",
      "to": [
        "https://programming.dev/c/test",
        "https://www.w3.org/ns/activitystreams#Public"
      ],
      "name": "Code Blocks",
      "cc": [],
      "content": "<p>Single line of code: [4 spaces and an escaped newline]<br />\n<code>return</code> [4 spaces and an escaped newline]<br />\nNew paragraph [2 escaped newlines]</p>\n<p>Code Block (no lang): [4 spaces and an escaped newline]</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">if this [4 spaces and an escaped newline]    \n</span><span style=\"color:#323232;\">then [4 spaces and an escaped newline]    \n</span><span style=\"color:#323232;\">that\n</span><span style=\"color:#323232;\">else\n</span><span style=\"color:#323232;\">the_other_thing [4 spaces and an escaped newline]    \n</span><span style=\"color:#323232;\">endif\n</span></pre>\n<p>(no spaces before newlines for next block)</p>\n<p>Code Block (python):</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"font-weight:bold;color:#a71d5d;\">if </span><span style=\"color:#323232;\">this </span><span style=\"font-weight:bold;color:#a71d5d;\">is not </span><span style=\"color:#0086b3;\">None</span><span style=\"color:#323232;\">:\n</span><span style=\"color:#323232;\">    that\n</span><span style=\"font-weight:bold;color:#a71d5d;\">else</span><span style=\"color:#323232;\">:\n</span><span style=\"color:#323232;\">    other_thing\n</span></pre>\n",
      "mediaType": "text/html",
      "source": {
        "content": "Single line of code: [4 spaces and an escaped newline]    \n`return` [4 spaces and an escaped newline]     \nNew paragraph [2 escaped newlines]\n\nCode Block (no lang): [4 spaces and an escaped newline]    \n```  [4 spaces and an escaped newline]    \nif this [4 spaces and an escaped newline]    \nthen [4 spaces and an escaped newline]    \nthat\nelse\nthe_other_thing [4 spaces and an escaped newline]    \nendif\n``` \n\n(no spaces before newlines for next block)\n\nCode Block (python):\n```Python\nif this is not None:\n    that\nelse:\n    other_thing\n```",
        "mediaType": "text/markdown"
      },
      "attachment": [],
      "commentsEnabled": true,
      "sensitive": false,
      "published": "2024-03-17T07:49:13.596948Z",
      "language": {
        "identifier": "en",
        "name": "English"
      },
      "audience": "https://programming.dev/c/test"
    },
    "cc": [
      "https://programming.dev/c/test"
    ],
    "type": "Create",
    "audience": "https://programming.dev/c/test"
  },
  "cc": [
    "https://programming.dev/c/test/followers"
  ],
  "type": "Announce",
  "id": "https://programming.dev/activities/announce/create/1047a16d-6393-4c2f-a5cc-9eeba4eb43db"
}
[–] freamon 1 points 8 months ago

Single line of code: [4 spaces and an escaped newline]
return [4 spaces and an escaped newline]
New paragraph [2 escaped newlines]

Code Block (no lang): [4 spaces and an escaped newline]

if this [4 spaces and an escaped newline]    
then [4 spaces and an escaped newline]    
that
else
the_other_thing [4 spaces and an escaped newline]    
endif

(no spaces before newlines for next block)

Code Block (python):

if this is not None:
    that
else:
    other_thing
[–] freamon 1 points 8 months ago

Code Block (no lang): [4 spaces and an escaped newline]

if this [4 spaces and an escaped newline]    
then [4 spaces and an escaped newline]    
that
else
the_other_thing [4 spaces and an escaped newline]    
endif

(no spaces before newlines for next block)

[–] freamon 1 points 8 months ago

Code Block (no lang): [4 spaces and an escaped newline]

if this [4 spaces and an escaped newline]    
then [4 spaces and an escaped newline]    
that
else
the_other_thing [4 spaces and an escaped newline]    
endif

(no spaces before newlines for next block)

fenced-code-blocks on

[–] freamon 1 points 8 months ago

Code Block (no lang): [4 spaces and an escaped newline]

if this [4 spaces and an escaped newline]    
then [4 spaces and an escaped newline]    
that
else
the_other_thing [4 spaces and an escaped newline]    
endif

(no spaces before newlines for next block)

fenced-code-blocks off

[–] freamon 1 points 8 months ago

fenced-code-blocks on

(is confused by a [] after the three backticks)

if this
then
that
else
other_thing
endif
[–] [email protected] 1 points 8 months ago

direct on piefed:

if this
then
that
else
other_thing
endif
[–] [email protected] 1 points 8 months ago

direct on piefed:

if thing is not None:
    print(thing)
[–] [email protected] 1 points 8 months ago
if highlight is not None:
   print(hightlight)
[–] [email protected] 1 points 8 months ago

have broke it?

[–] [email protected] 1 points 8 months ago
if missing is not None:
    print(missing)
[–] [email protected] 1 points 8 months ago
if pygs is not None:
    print(pygs)
[–] [email protected] 1 points 8 months ago
if miss is not None:
    print(miss)
[–] [email protected] 1 points 8 months ago
if working is not None:
    print(working)
[–] [email protected] 1 points 8 months ago
if pygs is not None:
    print('python flag is there' + pygs)
[–] [email protected] 1 points 8 months ago
if broken is not None:
    print(broken)
[–] [email protected] 1 points 8 months ago
if miss is not None:
    print(miss)