Tangents

Tangents: initial tests

Pixel art of a construction sign

Note

This is a test page for Tangents, my site's new writing section.

This is the first set of tests. This page is used to try out the features, see what works, check how everything looks, and decide what's missing, etc.

Nothing on this page is meant to be read as real content. These are just tests.

This post is a thorough set of tests for the Tangents markdown engine: the features it supports, how it behaves, and how the layout holds up, along with some cases it does not support. Each section says what it tests and what should happen, so a broken result is easy to spot.

This second paragraph is written across several source lines to check that they join into one paragraph with single spaces between them.

A level-one heading in the body

The heading above was written with a single #. It should render as an h2, because the post title is the only h1, and the build should log a warning about it.

Headings

Level three heading

Level four heading

Level five heading
Level six heading

####### Seven hashes is not a heading and should stay a plain paragraph.

Inline formatting

Plain text, bold text, italic with stars, italic with underscores, bold and italic, and inline code.

Formatting inside a word: unbelievable and incredible.

Underscores inside words stay literal: snake_case in code, and snake_case_name, _init_ and file_name_here as plain text.

Asterisks inside code stay literal: a * b * c and **not bold**.

Unbalanced markers should survive as text: a lone star, a lone * pair, and a lone _ underscore.

Characters that must be escaped: 5 < 6 > 4, Tom & Jerry, "double quotes", 'single quotes', and a raw tag <b>this should not be bold</b> that should show as literal text.

HTML entities written by hand: &copy; and &amp; should show as typed, not as symbols.

Unicode: ääkköset ÄÄKKÖSET, Hämäläinen, Räikkönen, Müller, Ørsted, Þór, naïve café, 日本語, Ελληνικά, and the arrows ← → ↑ ↓.

A very long word to test wrapping on narrow screens: Pneumonoultramicroscopicsilicovolcanoconiosis-plus-some-extra-characters-for-good-measure.

A very long URL as plain text: https://www.example.com/a/very/long/path/that/keeps/going/and/going/without/any/spaces/to/break/on/index.html

Line breaks

A line ending in a backslash breaks the line here,
so this sentence starts on a new line inside the same paragraph,
and so does this one.

A backslash at the very end of a paragraph has no line to break to and stays visible as text.\

A [[break]] directive on its own line adds an empty line between two paragraphs. One follows this paragraph.


This paragraph sits one empty line further down than usual. Two directives in a row follow it, for a larger gap.



This paragraph sits two empty lines further down. Extra blank lines in the source, like the three below, collapse and add no space.

This paragraph sits at the normal distance.

Links

Unordered lists

  • First item written with a hyphen
  • Second item with bold, italic, and code
  • Third item that is long enough to wrap onto a second line on most screens, so the hanging indent and the line height of wrapped list items can be checked properly.
  • First item written with an asterisk
  • Second item written with an asterisk

Ordered lists

  1. First step
  2. Second step with a link
  3. Third step

Numbers are ignored and the list always counts from one:

  1. Written as five
  2. Written as nine
  3. Written as one

A list with ten or more items, to check how two-digit markers align:

  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten
  11. Eleven

Blockquotes

A single-line blockquote.

A blockquote written across several source lines, with bold, italic, code, and a link, which should all join into one paragraph.

Two blockquotes in a row separated by a blank line.

This is the second one.

Callouts

A callout with a custom title and a single paragraph:

Gotcha!

Display objects removed with display.remove() still hold their Lua table, so set the reference to nil as well.

A callout whose title carries inline formatting, with several paragraphs, a list, and a code block inside:

Heads up: require caching

A module is loaded once and cached, so a second require returns the same table.

Two consequences:

  • Edits to the file need a restart to show up.
  • State stored in the module is shared by every caller.
local a = require( "settings" )
local b = require( "settings" )
print( a == b ) -- true

A callout with no title:

A callout without a title is just the box and its body.

A callout nested inside another, plus a closing line inside a code block that must not end the callout early:

IMPORTANT!

The outer callout starts here.

Nested

The inner callout sits inside the outer one.

[[/callout]]

The outer callout ends after this paragraph.

Horizontal rule

Text above the rule.


Text below the rule. A longer rule written with more dashes follows.


Code blocks

A Lua block:

local function greet( name )
	print( "Hello, " .. name .. "!" )
end

local enemies = { "slime", "bat", "ghost" }
for _, enemy in ipairs( enemies ) do
	greet( enemy )
end

A Python block:

def fizzbuzz(limit: int) -> list[str]:
    return ["FizzBuzz" if n % 15 == 0 else "Fizz" if n % 3 == 0 else "Buzz" if n % 5 == 0 else str(n) for n in range(1, limit + 1)]

A block with no language, holding HTML and markdown that must stay literal:

<script>alert("this must not run")</script>
<b>not bold</b> &amp; not an entity
**not bold** *not italic* [not a link](https://www.xedur.com)
[[youtube id="dQw4w9WgXcQ"]]
# not a heading
- not a list

A block with a very long line, to test horizontal scrolling:

local thisIsAVeryLongVariableNameThatKeepsGoing = someFunctionWithAVeryLongName( firstArgument, secondArgument, thirdArgument, fourthArgument, fifthArgument )

Images

A wide 1200x630 screenshot with alt text and a caption:

Screenshot of The Dark
A wide screenshot with a caption.

A square transparent PNG forced to 128x128 with width and height:

The XeduR logo
Forced to 128 by 128.

A pixel-art image at its natural 512x512 size with no caption:

Pixel art of a construction sign

An image with no alt text, which should log a build warning:

A local image that does not exist, which should log a build warning and show an "image unavailable" panel with its alt text:

A local file that is not there
A missing local image.

A remote image that returns 404, which should show the same panel:

A remote file that is not there
A missing remote image.

An image loaded by absolute URL from the live site:

The XeduR logo from the live site
Loaded by absolute URL.

Videos

A 16:9 video:

We don't use cookies, but YouTube does. To watch this video, you accept that YouTube may set cookies on your device.

A 4:3 video, to see how a different aspect ratio fits the 16:9 frame. Accepting either video should load both, and the choice should be remembered on reload:

We don't use cookies, but YouTube does. To watch this video, you accept that YouTube may set cookies on your device.

Repository panels

A repository by owner and name:

Source and documentation available over at:

A repository by full URL:

Source and documentation available over at:

A private repository, with no URL:

The source code for this project has not yet been made public. It might be on its way, but you can always contact Eetu and ask for it directly.

Unsupported syntax

Everything below is outside what the engine supports and should render as plain text or in some degraded but readable form.

Nested lists, where the indented items should flatten into the same list:

  • Parent item
  • Child item
  • Another child item
  • Second parent item

A table:

| Column A | Column B | |----------|----------| | One | Two |

Strikethrough: ~~this is not struck through~~.

Standard markdown image syntax: !alt text

Task list items:

  • [ ] Not a checkbox
  • [x] Not a checked checkbox

A footnote reference[^1] and its definition:

[^1]: This is not a footnote.

Backslash escapes: \not italic\ and \not italic\.

A setext heading, whose = underline stays plain text:

Not a heading =============

Heading anchors: jump to the code blocks renders as a link, but headings get no ids, so it goes nowhere.

That is the end of the tests.

Contact

If you'd like to learn more about me or my work, visit my other site: www.erantanen.com.

I'm active in the Solar2D community on the forums and Discord. I'm also an active game jammer and have participated in both Ludum Dare and Global Game Jam.

You can also reach me directly via email: eetu@erantanen.com.