22

When using wiki syntax, if I put an asterisk (*) at the beginning of a line, it gets transformed into a unordered list. How is it possible to have the asterisk to remain as it is when at the beginning of a line?

Example :

*Hello world, this sentence is not in an unordered list.
1
  • Have you tried escaping the asterisk with a "\", like this: \*
    – Tom Auger
    Nov 10, 2015 at 12:21

3 Answers 3

20

I think a better method is to use the 'nowiki' tag. This is generic and does not rely on knowing character codes, plus your text is more readable.

    <nowiki>*</nowiki> will display as an asterisk at the start of the sentence.

http://www.mediawiki.org/wiki/Help:Formatting

Now you can display any special characters you like!

2
  • 1
    This is a much better solution if for no other reason it ensures that asterisks used within the site have a consistent look.
    – ale
    Jul 19, 2012 at 13:23
  • FYI This will not work within a <math></math> tag.
    – Enkode
    Sep 6, 2016 at 22:48
12

You enter it as &lowast; or as &#42;, which will be displayed as and *, respectively, in HTML.

Here is a test:

  • Here is displayed as a bullet list.

∗ Here is displayer as an asterisk operator (Math Asterisk).

* Here is displayed as an asterisk.

And your example:

∗Hello world, this sentence is not in an unordered list.

or

*Hello world, this sentence is not in an unordered list.

See the Wikipedia entry regarding the Asterisk character for more information.

Update: Actually, the character is Small Asterisk, &#65121;. There is a slight difference between them—this one is bigger, for instance.

﹡Hello world, this sentence is not in an unordered list.

1
  • +1 because this works in Redmine and <nowiki> didn't work
    – Dave
    Jan 31, 2018 at 2:03
2

The other answers didn't seem to work for me in an Azure DevOps\VSTS wiki (which purports to be 'markdown'). What did work was using '\' as an escape character i.e.

\* Hello world, this sentence is not in an unordered list.

1
  • Unfortunately, wiki is an ambiguous term. Oxford says it is "a website that allows collaborative editing of its content and structure by its users." "wiki syntax" generally means MediaWiki syntax, but "Markdown" is a syntax used by some other wikis and documentation. The answer doesn't apply but thanks for clarifying which you are using when the OP did not.
    – Poikilos
    Aug 12, 2023 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.