Repository hosting: This project is on GitHub at
rg-software/wlx-markdown-viewer. Issues and pull requests are read/written with theghCLI (gh issue,gh pr). The remotegitorigin also points at GitHub.
Lister plugin (32/64-bit Windows) for Total Commander that renders HTML and Markdown files via the Internet Explorer WebBrowser control. Markdown is converted to HTML with the vendored hoedown engine (see Hoedown/). Based on HTMLView 1.2.6 source; also handles CHM and other IE-viewable content.
- Requires MS Visual Studio 2022 (v143 toolset). No vcpkg, no external package manager.
- Vendored dependencies:
boost/(nowide, header-only),ChmLib/,HTMLView/TextEncodingDetect/, and theHoedown/source tree. - From a VS 2022 Developer Command Prompt (or as
BuildMakeSetup.batdoes -vcvarsall.bat x86|x64then msbuild):- Win32 release:
msbuild MarkdownView.sln /t:Build /p:Configuration=Release;Platform=Win32;UseEnv=true - x64 release:
msbuild MarkdownView.sln /t:Build /p:Configuration=Release;Platform=x64;UseEnv=true
- Win32 release:
- The solution builds
hoedown-lib,hoedown,smartypantsfirst (project dependencies), thenMarkdownView. - Per-config outputs:
Build\MarkdownView.wlx(Win32) andBuild\MarkdownView.wlx64(x64) for Release; Debug x64 emitsBuild\MarkdownViewD.wlx64. Hoedown/lib/*.libandHoedown/bin/*.exeare build artifacts (gitignored).
BuildMakeSetup.batbuilds Release for both platforms, assemblesReleaseWLX/(css/,doc/, ini, inf, wlx/wlx64), and zips it toRelease-YYYYMMDD.zip.ReleaseWLX/and*.zipare gitignored build outputs - do not commit them.
- Hoedown rendering tests:
python Hoedown/test/runner.py(requirestidyinstalled and on PATH). Compares rendered Markdown output against expected HTML. - Configuration unit tests:
tests\run_tests.bat(builds and runstests/ini_settings_test.cppfor Win32 and x64). Checks the layered settings lookup (user ini -> shipped sample -> hardcoded default) and thatHTMLView/settings_defaults.hstill matchesBuild/MarkdownView.ini. - No linter; verification is a build of both platforms plus a manual load in Total Commander.
- Total Commander WLX exports (
ListLoad,ListLoadNext,ListSearchText/W,ListPrint,ListCloseWindow,ListGetDetectString-adjacent) live inHTMLView/main.cpp, exported viaHTMLView/htmlview.def. - Markdown files are detected by extension (from
MarkdownView.ini->[Extensions] MarkdownExtensions); other supported types (HTML, CHM, signatures) are handed to the IE WebBrowser control directly. - Markdown rendering pipeline (
browser_show_fileinHTMLView/main.cpp): read file (with encoding detection via text-encoding-detect), runhoedown_mainto convert to HTML, optionally runsmartypants, inject the configured CSS (fromBuild/css/), and load the result into the WebBrowser control via a stream. - Plugin settings come from
MarkdownView.ini(template shipped inBuild/MarkdownView.ini):[Extensions],[Renderer](HoedownArgs, UseSmartypants, CustomCSS/CustomCSSDark), hotkeys, toolbar/status bar options. - Settings are read through a layered lookup (
HTMLView/ini_settings.*): the user'sMarkdownView.iniwins, then the shippedMarkdownView.ini.samplefrom the same directory, then the hardcoded default fromHTMLView/settings_defaults.h(which mirrors the active values ofBuild/MarkdownView.ini). Lists are parsed withCSmallStringList(HTMLView/functions.*). - Encoding detection:
TextEncodingDetectplus boost::nowide for UTF-16 -> UTF-8 conversion.
- MSVC C++ with
MultiBytecharset and static CRT (MultiThreaded/MultiThreadedDebug); toolset v143. - Keep changes within the existing project layout; do not introduce new dependencies or package managers.
- Prefer editing the C/C++ sources and the
Build/css/sheets over restructuring. - Conventional Commits (
feat:,fix:,docs:,refactor:,chore:) so the release pipeline can group them; keep the subject under 72 characters.
masteris the single source of truth; no separate platform branches.- Do not run
git commit,git push,git reset, orgit rebasewithout explicit user confirmation.
- The canonical architecture/conventions reference is
openspec/config.yaml->context. It is loaded into AI-assisted sessions automatically, so there is a single source of truth - do not duplicate it here. - OpenSpec changes live under
openspec/changes/(active) andopenspec/changes/archive/(completed); main specs underopenspec/specs/.