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.
// Inline 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`
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.
Subheading: *// Subheading Text*
Subheading output: <h# id="subheading-text">// Subheading Text</h#> Actual heading level is based on config.
Optional TOC: If two or more 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-->.
// 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/^^)
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 (with a few instances of raw HTML passing through).
View Source
<?php
$hvmark = <<<TXT
<!--_This page documents *hVmark v1.x*. See Changelog for updates._-->
<h1>hVmark</h1>
*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]^^
<!--HV_TOC-->
*// Inline Markers*
<h3>Block Formatting</h3>
[+] *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>`.
<h3>Text Formatting</h3>
[+] *Bold*: `*text*`
[+] /Emphasis/ (Italics): `/text/` []Alternate: `%text%`
[+] -Strike-: `-text-`
[+] _Underline_: `_text_`
[+] `Code`: ```text```
<h3>Misc.</h3>
[+] *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.
[+] *Subheading*: `*// Subheading Text*`
[+] *Subheading output*: `<h# id="subheading-text">// Subheading Text</h#>` []Actual heading level is based on config.
[+] *Optional TOC*: If two or more 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-->`.
*// 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]^Caption^`
[+] *YouTube*: `@@ytb:VIDEOID^Caption^` (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"
];
$changelog = <<<TXT
*Version Convention* []`v[major].[minor].[patch]`
<!--CL_TOC-->
*// [2026-09-13] - v1.8.2*
[+] All the small things...
<h3><span aria-hidden="true">|| </span>[2026-09-10] - v1.8.1</h3>
[+] hVmark celebrates first anniversary... five days ago.
[+] Automatic escaping for non-anchored URLs.
[+] An updated/better parser demo was made for the repo.
<h3><span aria-hidden="true">|| </span>[2026-07-28] - v1.8.0</h3>
[+] *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.
<h3><span aria-hidden="true">|| </span>[2026-03-31] - v1.6.0</h3>
[+] 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^
<h3><span aria-hidden="true">|| </span>[2025-11-15] - v1.4.0</h3>
[+] 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* [](with a few instances of raw HTML passing through).&
TXT;
$hv_tabcount = 1;
$hv_lines = preg_split('/\R/', $hvmark, -1, PREG_SPLIT_NO_EMPTY);
$hv_output = hvmark_web($hv_lines);
hvmark_gentoc($hv_output);
echo $hv_output;
$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;
?>