Formatting options and automatic links
Started by Tig
avatar
Tig Rep. 1622
#1   16 Aug 2020
A heap of code changes have been happening in the background and you should not see any difference on the site, but stuff has changed :)

You can now use some CommonMark commonmark.org/ features. This is a very restricted subset at this stage.

For example, typing the following and what you get:

Use a pair of * or _ around some text for italics: *This be in italics* and _this is for italics_ too.

Double up for bold: **And we can have bold too** or if you like __underscores for bold__ you need 2 of them.

One thing I have wanted over the years was to be able to have code or console settings text to stand out. You can now.

For `console or code`, wrap the text in a pair of ` (backtick).

A single * or _ or ` in a basic bit of text should not produce an issue. If there is an issue, you will need to type a \ in front. For example, \* or \_ or \`

If you are wanting to use bold or italics in the middle of a word, you should use the * version. For example: This is in italics is written as i*tal*ics. Using the underscore will only work if there is a space in front and behind the _ and in the middle of a word, that does not look right.

The changes for the URL's (website links) are all to do with the detection and formatting. It has improved a heap and there should be less errors now. You still simply paste them in to the comment and they should be converted to a link.

The old button versions for the formatting still works too. Feel welcome to use which ever version you like.

As always, if you notice an issue, please let me know or hit the report option.

Edit - 17th March, 2023
Lists can now be made with the following formatting:
* a list item
* this is a * right at the beginning of a line.
* A nested list item is possible with a space before and after the *
* on the line below, if you do it again, another list item
If you use that syntax, you get the following:

  • a list item
  • this is a * right at the beginning of a line.
    • A nested list item is possible with a space before and after the *
  • on the line below, if you do it again, another list item
Simple ordered, or numbered lists are also possible. No support for nested lists with numbered list. Format is:
1. Start the line with a number (any single number) and a . after it.
2. Next line can also be any number
1. The numbers do not need to be in order, the code works this out.

And the displayed output is:

  1. Start the line with a number (any single number) and a . after it.
  2. Next line can also be any number
  3. The numbers do not need to be in order, the code works this out.
Note: For italics and bold on a list item, if you are getting odd results, use the _ formatting around words.
avatar
raspatan Rep. 4510
#2   17 Aug 2020
Amazing! Well done Tig!
avatar
Tig Rep. 1622
#3   14 Mar 2023
@Neon_Knight - Basic list support has been added for you :)

I'm trying to use syntax that is as close as possible to Common Mark, which has become a bit of standard.

avatar
Neon_Knight Rep. 254
#4   15 Mar 2023
Excellent!

Only registered members can post a reply.
Already registered? Sign in.

mbt_dm1
Clear