diff --git a/markdown.md b/markdown.md index f9be73751..251b213c9 100644 --- a/markdown.md +++ b/markdown.md @@ -9,19 +9,33 @@ These [Markdown Guidelines](markdown.html) are version **28.4 2025-04-28**.
## Markdown Guidelines Introduction -The IOCCC makes extensive use of [markdown](https://daringfireball.net/projects/markdown/). For example, when submitting to the IOCCC we have people submit remarks about their entry in markdown format. Every [winning entry](years.html) uses a `README.md` markdown file as the basis for forming the `index.html` web page for that entry. All HTML 5 generated pages on the [Official IOCCC website](https://www.ioccc.org/index.html) start with some markdown content. We no longer support older HTML standards and some of our guidelines help integrate winning entries into the website more easily. +The IOCCC makes extensive use of [markdown](https://daringfireball.net/projects/markdown/). +For example, when submitting to the IOCCC we have people submit remarks +about their entry in markdown format. Every [winning entry](years.html) +uses a `README.md` markdown file as the basis for forming the `index.html` +web page for that entry. All HTML 5 generated pages on the +[Official IOCCC website](https://www.ioccc.org/index.html) start with some +markdown content. We no longer support older HTML standards and some of +our guidelines help integrate winning entries into the website more easily. -See the [markdown syntax](https://www.markdownguide.org/basic-syntax) guide. See also the [CommonMark Spec](https://spec.commonmark.org/current/). See the FAQ on "[remarks.md submission file](faq.html#remarks_md)". +See the [markdown syntax](https://www.markdownguide.org/basic-syntax) guide. +See also the [CommonMark Spec](https://spec.commonmark.org/current/). See +the FAQ on "[remarks.md submission file](faq.html#remarks_md)". -Nevertheless, the IOCCC does have certain practices that we ask authors to follow. Some of these relate to use of markdown directly and others relate to injecting HTML into the markdown file. +Nevertheless, the IOCCC does have certain practices that we ask authors to +follow. Some of these relate to use of markdown directly and others relate +to injecting HTML into the markdown file. -In the sections below, examples will mark by ✕ for the incorrect method and ✔ for preferred correct one. +In the sections below, examples will mark by ✕ +for the incorrect method and ✔ for preferred +correct one. ## Start `remarks.md` sections at level 3 -IF (it is not required) you do use sections in your `remarks.md` file (this does not apply to other markdown files), **PLEASE** start at level three upto level six: +If (it is not required) you do use sections in your `remarks.md` file (this does +not apply to other markdown files), **PLEASE** start at level three up to level six: ``` ✕ # Section Reserved @@ -88,10 +102,11 @@ IF (it is not required) you do use sections in your `remarks.md` file (this does ✕ echo "This code block is NOT indented" ``` -We request that you indent the code block by multiples of four (4) ASCII SPACES, never TAB (␉): +We request that you indent the code block by multiples of four (4) +ASCII SPACES, never TAB (␉): ```` -✔ echo "This code block is indented by mutiples of 4 spaces" +✔ echo "This code block is indented by multiples of 4 spaces" ✔ # The top level starts with a 4 ASCII space indent. ✔ # @@ -101,7 +116,8 @@ We request that you indent the code block by multiples of four (4) ASCII SPACES, ✔ # etc. ```` -Alternatively its possible to use ` ``` ` marks, without the initial four (4) space indentation. This is usually the better method. +Alternatively its possible to use ` ``` ` marks, without the initial +four (4) space indentation. This is usually the better method. ```` ✔ ``` @@ -113,11 +129,15 @@ Alternatively its possible to use ` ``` ` marks, without the initial four (4) sp ## Do not use ASCII TAB in markdown files. -Please do **NOT** indent with ASCII TABs (␉), **OR** use any ASCII TAB (␉) anywhere inside a markdown file. +Please do **NOT** indent with ASCII TABs (␉), **OR** use any ASCII TAB +(␉) anywhere inside a markdown file. -While we have nothing against the ASCII TAB (␉) character in general, we have discovered that ASCII TAB (␉) characters create problems when used as part of the leading whitespace within a markdown file. +While we have nothing against the ASCII TAB (␉) character in general, +we have discovered that ASCII TAB (␉) characters create problems when +used as part of the leading whitespace within a markdown file. -If you need to indent two (2 or more levels, use multiples of four (4) ASCII SPACES. +If you need to indent two (2 or more levels, use multiples of four (4) +ASCII SPACES. ```` ``` @@ -129,7 +149,8 @@ If you need to indent two (2 or more levels, use multiples of four (4) ASCII SPA ``` ```` -And to clarify, we are only talking about markdown files, not C code or any other non-markdown content: +And to clarify, we are only talking about markdown files, not C code or +any other non-markdown content: ```` ✔ printf("It is fine to use tabs in Obfuscated C code.\n"); @@ -139,12 +160,16 @@ And to clarify, we are only talking about markdown files, not C code or any othe ✔ // or in any other markdown files within your entry, please. ```` -**NOTE**: Again, you are **perfectly welcome** to use ASCII tab characters in your C code and other non-markdown files. We simply ask that you do **NOT** use any ASCII TAB (␉) characters in markdown files. +**NOTE**: Again, you are **perfectly welcome** to use ASCII tab +characters in your C code and other non-markdown files. We simply ask +that you do **NOT** use any ASCII TAB (␉) characters in markdown files. ### Tip for `vim` users -If you use `vim` you can put in your `.vimrc` file (usually `~/.vimrc`) the following settings to make sure the tabs are not put in without you noticing: +If you use `vim` you can put in your `.vimrc` file (usually `~/.vimrc`) +the following settings to make sure the tabs are not put in without you +noticing: ``` set tabstop=8 " a tab is 8 spaces (or whatever you wish it to be set to) @@ -153,15 +178,18 @@ set shiftwidth=4 " ...and auto-indent 4 spaces (when autoindent is se set expandtab " ...expand tab into spaces ``` -If you have file type detection enabled you can, if you prefer, have these settings set just for markdown files: +If you have file type detection enabled you can, if you prefer, have +these settings set just for markdown files: ``` autocmd! Filetype markdown setlocal set tabstop=8 softtabstop=4 shiftwidth=4 expandtab ``` -This will prevent the tab key from inserting tabs; rather it will insert four (4) spaces. +This will prevent the tab key from inserting tabs; rather it will insert +four (4) spaces. -To **VERIFY** that there are no tabs in a file you may do, in command mode: +To **VERIFY** that there are no tabs in a file you may do, in command +mode: ``` /\t @@ -173,30 +201,39 @@ If you're in insert mode hit `ESC` first. ## Use HTML comments for code block language syntax. -We request that [fenced markdown code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) **NOT** specify a language directly. +We request that [fenced markdown code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) +**NOT** specify a language directly. ```` -```c - int main(void) {return 0;} -``` +✕ ```c +✕ int main(void) {return 0;} +✕ ``` ```` -Instead, put the language inside an HTML comment, separated from the markdown code block starting fence by a space: +Instead, put the language inside an HTML comment, separated from the +markdown code block starting fence by a space: ```` -``` - int main(void) {return 0;} -``` +✔ ``` +✔ int main(void) {return 0;} +✔ ``` ```` -**IMPORTANT**: The **initial** **\` \` \`** must be followed by an **ASCII SPACE**, and **THEN** an **opening** **``" (two "`-`"s followed by a "`>`"). +**IMPORTANT**: The **initial** **\` \` \`** must be +followed by an **ASCII SPACE**, and **THEN** an **opening** ** +``" (two "`-`"s +followed by a "`>`"). -## Insure blank line between code block and text. +## Ensure blank line between code block and text. -Please do **NOT** place text on the next line after a markdown code block. Instead, place a blank line after the end of a markdown code block as this makes it easier to detect when markdown code blocks are **NOT** properly indented. +Please do **NOT** place text on the next line after a markdown code +block. Instead, place a blank line after the end of a markdown code +block as this makes it easier to detect when markdown code blocks are +**NOT** properly indented. ```` ✕ ``` @@ -223,11 +260,13 @@ Please do **NOT** place text on the next line after a markdown code block. Inste ## Do not add trailing slash to void HTML tags. -Please do **NOT** use a trailing slash on [void HTML elements](https://github.com/validator/validator/wiki/Markup-»-Void-elements). +Please do **NOT** use a trailing slash on +[void HTML elements](https://github.com/validator/validator/wiki/Markup-»-Void-elements). See also this note on [trailing slashes in void-element start tags](https://github.com/validator/validator/wiki/Markup-»-Void-elements#trailing-slashes-in-void-element-start-tags-do-NOT-mark-the-start-tags-as-self-closing). -The trailing slash on void HTML elements has no effect and interacts badly with unquoted attribute values. +The trailing slash on void HTML elements has no effect and interacts +badly with unquoted attribute values. ``` ✕