hVmark is a tiny, opinionated markup language made by and for, well, me. While it's used all over this website, it's primarily used in posts in lieu of hard-coded HTML.
Formatting Markers
Block Formatting
Center Text: &text& Wraps line in <center> tag.
Quotes: @@quo:First paragraph. {}Second paragraph.^Attribution^ Creates a <blockquote>. {} acts as a hard line break/paragraph separator that only works inside of the quote field. Attributions are wrapped in a trailing <footer>.
Text Formatting
Bold: *text*
Emphasis (Italics): /text/ Alternate: %text%
Strike: -text-
Underline: _text_
Code: `text`
Headings
Main Heading: *# Main Heading Text*
Main Heading output: <h1># Main Heading Text</h1> Actual heading level is based on what Lvl 1 is.
Subheading Lvl 1: *// Subheading Text*
Subheading Lvl 1 output: <h2 id="subheading-text">// Subheading Text</h2> Actual heading level is based on config.
Subheading Lvl 2: *|| Subsubheading Text*
Subheading Lvl 2 output: <h3 id="subsubheading-text">|| Subsubheading Text</h3> Actual heading level is based on what Lvl 1 is.
Optional TOC: If two or more high-level subheadings are found, a table of contents will be generated. The TOC is automatically placed under the main heading (<h1>) of the page, at the top of the page if a main heading isn't present, or at the location of <!--HV_TOC-->.
The visibility of symbols in headings and the TOC can be toggled in config.
Misc.
Soft line break: [] → <br>
Horizontal rule: --- → <hr> Three or more-, *, or _ characters on their own line will output a horizontal rule. Output styling depends on configuration.
Links, Images, YouTube
All use the same “anchor + fangs” pattern as quotes: @@anchor^fangs^
Links: @@https://example.com/^Link text^ (leave fangs empty to use the URL as text, e.g. @@https://example.com/^^)
Order matters when nesting: * and / are forgiving, but consistent nesting is recommended.
Inline raw HTML on a line disables hVmark parsing on that line.
A backslash will escape an inline marker and output the literal symbol. (e.g., \/ will output /.)
Emojis are supported in regular text, but not in subheadings.
Subheadings with similar names will have duplicate IDs; the TOC generator does not add incrementing suffixes.
Quotes are text only.
Changelog
Version Convention v[major].[minor].[patch]
// [2026-10-07] - v1.8.7
Main Heading added, since it came free with the previous patches.
Fixed a simple, yet catastrophic, TOC bug introduced in v1.8.6.
So many patches... You can say I'm killing it right now.
|| [2026-10-05] - v1.8.6
// and || visually appearing in subheadings is now configurable.
|| [2026-10-02] - v1.8.5
Alt text and caption text in images can now be set separately using |+|.
Example: @@img:/path/to/nothing.png^Alt text.|+|Caption Text.^ Order matters with placement; alt text first, and caption second.
If either one is empty, the other will still appear in its respective field.
Without |+|, the text will revert to being both the alt text and the caption.
Also works for @@ytb:VIDEOID^Title|+|Caption.^, with the first field acting as the title of the embedded object. (An empty title will revert to the default name.)
Tabbed whitespace cleanup.
|| [2026-09-26] - v1.8.4
Subheading levels added: *// Subheading Text* is level 1, *|| Subsubheading Text* is level 2.
I honestly can't imagine the existence of a level 3.
But as this past year has taught me, never say never.
So, who knows what the future holds?
|| [2026-09-23] - v1.8.3
Table of contents refinement.
We've never had this many patch releases before... It feels weird.
|| [2026-09-13] - v1.8.2
All the small things... (Misc. tiny fixes.)
|| [2026-09-10] - v1.8.1
hVmark celebrates first anniversary... five days ago.
Automatic escaping for non-anchored URLs.
An updated/better parser demo was made for the repo.
|| [2026-07-28] - v1.8.0
New block formatting marker. Quotes: @@quo:Quote^Optional Attribution^
Alt text of images can now include marker symbols.
Misc. output cleanup.
// [2026-05-24] - v1.7.0
New italic text marker: /text/
%text% is now considered deprecated, but will remain in codebase for backwards compatibility.
Auto-TOC under first <h1>/<h2> or at <!--HV_TOC-->.
// [2025-09-30] - v1.2.0
Module consolidation and general housekeeping.
Regex tightening for text-formatting markers.
Misc. bug fixes.
// [2025-09-09] - v1.1.0
Escapes: \* \% \- \_ \[] (literal output).
Image size [px|%] and alignment left|right|center|blank.
Misc. bug fixes.
// [2025-09-05] - v1.0.0
v1 initial: strict per-line parsing; inline HTML on a line disables hVmark on that line.
Inline text-formatting markers.
“Anchor + fangs” for links/images/YouTube.
Soft line break [] inside lists/captions.
Lists: [+] (dotted) and [-] (plain).
Wired root hVmark parser into existing auto-paragraphing framework.
hVmark v1 is available under the MIT license. hVmark is not a general-purpose Markdown replacement; it’s a small, strict tool that I actively use and maintain.
And, yes: this document was written in hVmark.
View Source
<?php
$hvmark = <<<TXT
<!--_This page documents *hVmark v1.x*. See Changelog for updates._-->
*# hVmark*
*hVmark* is a tiny, opinionated markup language made by and for, well, me. While it's used all over this website, it's primarily used in posts in lieu of hard-coded HTML.
@@img:/images/buttons/hvmark.png[88px blank]^hVmark 88x31 button.|+|^
<!--HV_TOC-->
*// Formatting Markers*
*|| Block Formatting*
[+] *Center Text*: `&text&` []Wraps line in `<center>` tag.
[+] *Quotes*: `@@quo:First paragraph. {}Second paragraph.^Attribution^` []Creates a `<blockquote>`. `{}` acts as a hard line break/paragraph separator that only works inside of the quote field. Attributions are wrapped in a trailing `<footer>`.
*|| Text Formatting*
[+] *Bold*: `*text*`
[+] /Emphasis/ (Italics): `/text/` []Alternate: `%text%`
[+] -Strike-: `-text-`
[+] _Underline_: `_text_`
[+] `Code`: ```text```
*|| Headings*
[+] *Main Heading*: `*# Main Heading Text*`
[+] *Main Heading output*: `<h1># Main Heading Text</h1>` []Actual heading level is based on what Lvl 1 is.
[+] *Subheading Lvl 1*: `*// Subheading Text*`
[+] *Subheading Lvl 1 output*: `<h2 id="subheading-text">// Subheading Text</h2>` []Actual heading level is based on config.
[+] *Subheading Lvl 2*: `*|| Subsubheading Text*`
[+] *Subheading Lvl 2 output*: `<h3 id="subsubheading-text">|| Subsubheading Text</h3>` []Actual heading level is based on what Lvl 1 is.
[+] *Optional TOC*: If two or more high-level subheadings are found, a table of contents will be generated. The TOC is automatically placed under the main heading (`<h1>`) of the page, at the top of the page if a main heading isn't present, or at the location of `<!--HV_TOC-->`.
[+] The visibility of symbols in headings and the TOC can be toggled in config.
*|| Misc.*
[+] *Soft line break*: `[]` → `<br>`
[+] *Horizontal rule*: `---` → `<hr>` []*Three or more* `-`, `*`, or `_` characters on their own line will output a horizontal rule. []Output styling depends on configuration.
*// Links, Images, YouTube*
All use the same *“anchor + fangs”* pattern as quotes: `@@anchor^fangs^`
[+] *Links*: `@@https://example.com/^Link text^` [](leave fangs empty to use the URL as text, e.g. `@@https://example.com/^^`)
[+] *Images*: `@@img:/path/file.jpg^Caption^` (85% width by default; caption optional) []Full: `@@img:/path/file.jpg[(50px|25%) (left|right|center|blank)]^Alt Text.|+|Caption Text.^`
[+] *YouTube*: `@@ytb:VIDEOID^Title|+|Caption Text.^` (caption optional)
*// Lists*
[+] *Dotted*: one item per line starting with `[+]`
[+] *Plain*: one item per line starting with `[-]`
[+] Soft breaks are allowed inside items via `[]`
*// Notes & Quirks*
[+] */Order matters/ when nesting*: `*` and `/` are forgiving, but consistent nesting is recommended.
[+] Inline raw HTML on a line disables hVmark parsing on that line.
[+] A backslash will escape an inline marker and output the literal symbol. [](e.g., `\/` will output \/.)
[+] Emojis are supported in regular text, but not in subheadings.
[+] Subheadings with similar names will have duplicate IDs; the TOC generator does not add incrementing suffixes.
[+] Quotes are *_text only_*.
*// Changelog*
TXT;
$cl_opts = [
"placeholder" => "<!--CL_TOC-->",
"class" => "cl",
"label" => "Changelog",
"bullet" => ""
];
$changelog = <<<TXT
*Version Convention* []`v[major].[minor].[patch]`
<!--CL_TOC-->
*// [2026-10-07] - v1.8.7*
[+] Main Heading added, since it came free with the previous patches.
[+] Fixed a simple, yet catastrophic, TOC bug introduced in `v1.8.6`.
[+] So many patches... []You can say I'm /killing it/ right now.
*|| [2026-10-05] - v1.8.6*
[+] `//` and `||` visually appearing in subheadings is now configurable.
*|| [2026-10-02] - v1.8.5*
[+] Alt text and caption text in images can now be set separately using `|+|`.
[+] Example: `@@img:/path/to/nothing.png^Alt text.|+|Caption Text.^` []*Order matters* with placement; alt text first, and caption second.
[+] If either one is empty, the other will still appear in its respective field.
[+] Without `|+|`, the text will revert to being both the alt text and the caption.
[+] Also works for `@@ytb:VIDEOID^Title|+|Caption.^`, with the first field acting as the title of the embedded object. [](An empty title will revert to the default name.)
[+] Tabbed whitespace cleanup.
*|| [2026-09-26] - v1.8.4*
[+] Subheading levels added: []`*// Subheading Text*` is level 1, []`*|| Subsubheading Text*` is level 2.
[+] I honestly can't imagine the existence of a level 3.
[+] But as this past year has taught me, never say never.
[+] So, who knows what the future holds?
*|| [2026-09-23] - v1.8.3*
[+] Table of contents refinement.
[+] We've never had this many patch releases before... []It feels weird.
*|| [2026-09-13] - v1.8.2*
[+] All the small things... [](Misc. tiny fixes.)
*|| [2026-09-10] - v1.8.1*
[+] hVmark celebrates first anniversary... five days ago.
[+] Automatic escaping for non-anchored URLs.
[+] An updated/better parser demo was made for the repo.
*|| [2026-07-28] - v1.8.0*
[+] *New block formatting marker.* []Quotes: `@@quo:Quote^Optional Attribution^`
[+] Alt text of images can now include marker symbols.
[+] Misc. output cleanup.
*// [2026-05-24] - v1.7.0*
[+] New italic text marker: `/text/`
[+] `%text%` is now considered deprecated, but will remain in codebase for backwards compatibility.
[+] Note @@/man-page#deprecation-policy^Deprecation Policy^ for more info on future use.
*// [2026-04-10] - v1.6.1*
[+] Improved code escaping.
[+] General housekeeping & bug stomping.
*|| [2026-03-31] - v1.6.0*
[+] Added code and centered text markers.
[+] Leaned into the %"this parser emits deprecated code"% angle, because why not?
[+] Seriously deliberating adding blockquotes.
*// [2025-12-29] - v1.5.0*
[+] Added horizontal rule markers [](`---`, `***` and `___`).
[+] Cleaned up vanilla reference model.
[+] Misc. output cleanup.
*// [2025-12-27] - v1.4.1 | Vanilla Reference Model*
[+] Project up to this point was made available via %GitHub%.
[+] Site-specific code was removed; []model contains the _root functionality_.
[+] Published under the MIT license.
[+] @@https://github.com/HisVirusness/hvmark^Download Here^
*|| [2025-11-15] - v1.4.0*
[+] Parser consistency pass for anchors/fangs (images & YouTube).
[+] Global image behavior normalized; width/align controlled at source.
[+] Added style-fallbacks to make targeted output CSS-agnostic.
[+] Minor general output cleanup.
*// [2025-10-22] - v1.3.0*
[+] Global declarations added for centralized control.
[+] Added subheading marker []`*// Heading*` → `<h# id="...">`.
[+] Auto-TOC under first `<h1>/<h2>` or at `<!--HV_TOC-->`.
*// [2025-09-30] - v1.2.0*
[+] Module consolidation and general housekeeping.
[+] Regex tightening for text-formatting markers.
[+] Misc. bug fixes.
*// [2025-09-09] - v1.1.0*
[+] Escapes: `\* \% \- \_ \[]` (literal output).
[+] Image size `[px|%]` and alignment `left|right|center|blank`.
[+] Misc. bug fixes.
*// [2025-09-05] - v1.0.0*
[+] v1 initial: strict per-line parsing; inline HTML on a line disables hVmark on that line.
[+] Inline text-formatting markers.
[+] “Anchor + fangs” for links/images/YouTube.
[+] Soft line break `[]` inside lists/captions.
[+] Lists: `[+]` (dotted) and `[-]` (plain).
[+] Wired root hVmark parser into existing auto-paragraphing framework.
---
&*hVmark v1* is @@https://github.com/HisVirusness/hvmark^available under the MIT license^. []hVmark is _not a general-purpose Markdown replacement_; []it’s a small, strict tool that I actively use and maintain.&
&[]And, yes: *this document was written in hVmark.*&
TXT;
$hv_tabcount = 1;
$hv_subhead_symbols = false;
$hv_lines = preg_split('/\R/', $hvmark, -1, PREG_SPLIT_NO_EMPTY);
$hv_output = hvmark_web($hv_lines);
hvmark_gentoc($hv_output);
echo $hv_output;
$hv_subhead_symbols = true;
$cl_lines = preg_split('/\R/', $changelog, -1, PREG_SPLIT_NO_EMPTY);
$cl_output = hvmark_web($cl_lines);
hvmark_gentoc($cl_output, $cl_opts);
echo $cl_output;
?>