Allow both Liquid-style and Markdown-style image links in the same document
This commit is contained in:
parent
5ac04b7b0d
commit
224a19be4f
2 changed files with 18 additions and 7 deletions
14
README.md
14
README.md
|
|
@ -13,9 +13,9 @@ machines:
|
|||
|
||||
Welcome to [PCjs](/docs/about/pcjs/), the first IBM PC simulation to run in your web browser without any plugins.
|
||||
It was added to the [JavaScript Machines](/docs/about/) project in Fall 2012, and it is now part of the
|
||||
[PCjs Project](https://github.com/jeffpar/pcjs) on GitHub. The project includes:
|
||||
[PCjs Project](https://github.com/jeffpar/pcjs) on [GitHub](http://github.com/). The project includes:
|
||||
|
||||
* [PCjs](/docs/about/pcjs/), a simulation of the original IBM PC (circa 1981)
|
||||
* [PCjs](/docs/pcjs/), a simulation of the original IBM PC (circa 1981)
|
||||
* [C1Pjs](/docs/c1pjs/), a simulation of the OSI Challenger 1P (circa 1978)
|
||||
|
||||
All the simulations are written entirely in JavaScript. No Flash, Java or other plugins are required.
|
||||
|
|
@ -38,6 +38,16 @@ Demos
|
|||
---
|
||||
Some pre-configured machines are shown below, ready to run BASIC, DOS, Windows 1.01, and assorted non-DOS software.
|
||||
|
||||
{% comment %}
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
{% endcomment %}
|
||||
{% include screenshot.html src="/devices/pc/machine/5150/cga/64kb/donkey/thumbnail.jpg" width="200" height="120" title="IBM PC running DONKEY.BAS" link="/devices/pc/machine/5150/cga/64kb/donkey/" %}
|
||||
{% include screenshot.html src="/devices/pc/machine/5160/cga/256kb/demo/thumbnail.jpg" width="200" height="120" title="IBM PC XT w/CGA, 10Mb Hard Drive" link="/devices/pc/machine/5160/cga/256kb/demo/" %}
|
||||
{% include screenshot.html src="/devices/pc/machine/5160/cga/256kb/win101/thumbnail.jpg" width="200" height="120" title="IBM PC XT w/CGA, Windows 1.01" link="/devices/pc/machine/5160/cga/256kb/win101/" %}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ function MarkOut(sMD, sIndent, req, aParms, fDebug, fMachineXML)
|
|||
/**
|
||||
* CLI()
|
||||
*
|
||||
* Provides a command-line interface for the markout module
|
||||
* Provides a command-line interface for the MarkOut module
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
|
|
@ -323,7 +323,7 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
|
||||
/*
|
||||
* Before performing the original comment-elimination step, a new step has been added that
|
||||
* allows blocks of Markdown to be excluded from the Markout process (eg, build instructions
|
||||
* allows blocks of Markdown to be excluded from the MarkOut process (eg, build instructions
|
||||
* that you'd like to see on GitHub but that don't need to be displayed on the public website).
|
||||
*
|
||||
* Basically, you wrap those kinds of blocks with a pair of special comments, like so:
|
||||
|
|
@ -334,8 +334,8 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
* triple-dash-style comments.
|
||||
*/
|
||||
if (!this.fDebug) {
|
||||
sMD = sMD.replace(/\{%\s*if\s+page\.developer\s*%}[\s\S]*?{%\s*endif\s*%}\s*/, "");
|
||||
sMD = sMD.replace(/[ \t]*<!--+\s*begin:exclude\s*-+->[\s\S]*?<!--+\s*end:exclude\s*-+->[\r\n]*/i, "");
|
||||
sMD = sMD.replace(/\{%\s*if\s+page\.developer\s*%}[\s\S]*?{%\s*endif\s*%}\s*/g, "");
|
||||
sMD = sMD.replace(/[ \t]*<!--+\s*begin:exclude\s*-+->[\s\S]*?<!--+\s*end:exclude\s*-+->[\r\n]*/gi, "");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -350,6 +350,7 @@ MarkOut.prototype.convertMD = function(sIndent)
|
|||
* the lack of JavaScript support for the "s" (aka "dotall" or "multiline") option that enables
|
||||
* "." to match newlines.
|
||||
*/
|
||||
sMD = sMD.replace(/\{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}\s*/g, "");
|
||||
sMD = sMD.replace(/<!--[\s\S]*?-->/g, "");
|
||||
|
||||
/*
|
||||
|
|
@ -789,7 +790,7 @@ MarkOut.prototype.convertMDLinks = function(sBlock)
|
|||
* TODO: These replacements should use appropriate values from _config.yml; however, unless/until
|
||||
* we start using Node again to host the public site, that's low priority.
|
||||
*/
|
||||
sBlock = sBlock.replace(/\{([\{%]).*?\1}/, "");
|
||||
sBlock = sBlock.replace(/\{([\{%]).*?\1}/g, "");
|
||||
|
||||
var aMatch;
|
||||
var re = /\[([^\[\]]*)]\((.*?)(?:\s*"(.*?)"\)|\))/g;
|
||||
|
|
|
|||
Loading…
Reference in a new issue