[Feature] Inline code markup

Code of conduct, suggestions, and information on forums.debian.net.
Post Reply
Message
Author
User avatar
/usr/
Posts: 24
Joined: 2022-12-17 14:50
Been thanked: 1 time

[Feature] Inline code markup

#1 Post by /usr/ »

This BB-code creates a new line:

Code: Select all

[code]
Would be ace to have an inline alternative, e.g. [c], similar to `` in markdown.

User avatar
sunrat
Site admin
Site admin
Posts: 7451
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [Feature] Inline code markup

#2 Post by sunrat »

I don't understand what you are asking. Please explain more.

If you are asking for changes to the forum markup code, that would be a request for the phpBB forum software developers.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
/usr/
Posts: 24
Joined: 2022-12-17 14:50
Been thanked: 1 time

Re: [Feature] Inline code markup

#3 Post by /usr/ »

sunrat wrote: 2024-03-17 11:46 I don't understand what you are asking. Please explain more.

If you are asking for changes to the forum markup code, that would be a request for the phpBB forum software developers.
A way to delineate a code block without creating a new line. Say I want to include a short snippet here:

Code: Select all

echo "Hello World!"
[ code ] BB-code tag effectively adds \n before the code.

rotero
Posts: 7
Joined: 2024-04-01 18:46
Has thanked: 3 times

Re: [Feature] Inline code markup

#4 Post by rotero »

I'm new to the forum and was just searching for the correct tags for inline code. Apparently, you need to add a customization to have an inline code tag in phpBB: Inline BBCode [c][/c]

Augie77
Posts: 110
Joined: 2024-03-23 04:05
Has thanked: 23 times
Been thanked: 23 times

Re: [Feature] Inline code markup

#5 Post by Augie77 »

Yep, I think this would be a good idea. It has always bugged me (on another site) that when mentioning a command, encased in the standard

Code: Select all

 command 
there was a new line added and the sentence continued on actually a third line.

When really all I wanted to do was to use the command in a contiguous sentence, encased so as not to cause a problem.

User avatar
sunrat
Site admin
Site admin
Posts: 7451
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [Feature] Inline code markup

#6 Post by sunrat »

You got it! Send my fee to sunrat@theinternet.org . :mrgreen:

command here Voilà code inline.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Augie77
Posts: 110
Joined: 2024-03-23 04:05
Has thanked: 23 times
Been thanked: 23 times

Re: [Feature] Inline code markup

#7 Post by Augie77 »

Thank you sir, that is appreciated.

rotero
Posts: 7
Joined: 2024-04-01 18:46
Has thanked: 3 times

Re: [Feature] Inline code markup

#8 Post by rotero »

sunrat wrote: 2024-04-08 06:41 You got it! Send my fee to sunrat@theinternet.org . :mrgreen:

command here Voilà code inline.
Excellent. Thank you. But of course, once you deliver a feature, someone wants it to be better… It would be nice if there were a button for the inline code tags in the formatting toolbar. Then we could paste or type an inline snippet, highlight the snippet, and click the toolbar button to wrap the text in the appropriate tags, which in many cases can be done faster than moving the cursor and typing them.

User avatar
sunrat
Site admin
Site admin
Posts: 7451
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [Feature] Inline code markup

#9 Post by sunrat »

rotero wrote: 2024-04-29 20:13 Excellent. Thank you. But of course, once you deliver a feature, someone wants it to be better… It would be nice if there were a button for the inline code tags in the formatting toolbar.
Considering there is already a code button in the toolbar, and the number of posters who use that incorrectly, I don't think that will happen as it will just confuse less tech-savvy members. The forum has existed happily without it for over 20 years.
Inline code will remain a feature for those who know how to use it. It's trivially easy anyway, just

Code: Select all

[c]code here[/c]
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply