Summary
Test of the forum markup.
This post is me testing the formatting options of the forum. I tried to make it informative while testing things, so hopefully it can be of use to new forum members as well.
Escaping formatting symbols
To display characters used for formatting, they may need to be escaped using \ (like when not used inside a code block).
*test* is written using \test\
Headers
Headers are rows staring with one to six #, just like <h1>
to <h6>
in html. The header for this section is using ### Headers
Basic text formatting
Text surrounded by one to three stars or underscores makes them (in order):
- Text surrounded by one underscore or star makes it italics
- Two stars or underscores makes it bold
- Three makes it both bold and italics
Fixed width text
blockquotes start with a >
Preformatted text
Non-code preformatted text starts with four spaces (need one blank row before and after):
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude
Inline code
Inline code has backquotes surrounding
it, like `this`
Codeblocks
Three backquotes marks blocks of code. For yaml markup, we should normally use ```yaml at top and ``` at the bottom of the code block. This doesn’t seem to change much, but we still get comments hilighted differently than the rest.
#YAML hilighting example
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude
For some reason get a different result if we have a doublequoted (string) value in our yaml.
#YAML hilighting example #2
homeassistant:
# Name of the location where Home Assistant is running
name: "Home"
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude
This makes me suspect that yaml is missing a correct hilighting implementation at the moment. But I think it’s probably good to use ```yaml anyway, in case it gets’s implemented at a later point in time.
Other language examples:
#```python
s = "Python syntax highlighting"
print
//```javascript
var s = "JavaScript syntax highlighting";
alert(s);
Tables
Tables doesnt seem to work like in the cheatsheet , but they mention that “Tables aren’t part of the core Markdown spec”. (I put it as preformatted below, but it doesn’t work without it either).
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Lists
- Lists can be either ordered or unordered.
- Sublists can be made as a different type than the parent item.
- Subitems / lists inside lists
- Subitems are indented with spaces
Note: Two lists after another needs to be separated by a non-list item or they will end up as one list. If you don’t want any visible text to separate them you can use an empty codeblock: `` with an empty row above and below it.
- Bullet list marked with *
- Marking with a dash works too.
- indented one level, 2 spaces
- two levels, 4 spaces
- three… takes 8 spaces
text keeps its indentation like the last point until
one extra blank line is used
- three… takes 8 spaces
- two levels, 4 spaces
- indented one level, 2 spaces