Renaming "preformatted text" to "code box"

Hey I have a suggestion, can you please change the name “Preformatted text” to
“Code box” will you do that please? This makes it easier for us newbies. I was looking for code box and I couldn’t find it so I was confused there for a moment.

If it said code box that would be less confusing for us newbie so I hope you change that, thanks.

1 Like

While I agree that “Code box” may be a common term in some places, “Preformatted text” is more correct. The simple reason is, it’s not just code that people use “Code boxes” for. It might be code, but it also, might not be. It could be configuration files, diffs or just something that needs to be shown with a fixed-width font to render correctly:

 ""#      "    #                      m    #        "
   #    mmm    #   m   mmm          mm#mm  # mm   mmm     mmm
   #      #    # m"   #"  #           #    #"  #    #    #   "
   #      #    #"#    #""""           #    #   #    #     """m
   "mm  mm#mm  #  "m  "#mm"           "mm  #   #  mm#mm  "mmm"

Which looks weird (below) outside of the ``` backticks, because it’s preformatted - hence the name. This is not code.


“”# " # m # "

mmm # m mmm mm#mm # mm mmm mmm

# # m" #" # # #" # # # "

# #“# #”“”" # # # # “”"m

"mm mm#mm # "m “#mm” "mm # # mm#mm “mmm”


In markdown, we can ask the page rendering our text to colourise the text appropriately, depending on the content, by specifying the format of the file on the first line…

```bash
#!/bin/bash
echo "Starting backup..."
tar -czf backup.tar.gz /home/user/documents
echo "Backup complete!"
```

Which renders like this:

#!/bin/bash
echo "Starting backup..."
tar -czf backup.tar.gz /home/user/documents
echo "Backup complete!"

However, on this site, the style sheet is broken, and doesn’t colourise the preformatted text, which is a shame. Here’s what that should look like:

image

I have requested that it’s fixed.

2 Likes