Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 24, 2020. It is now read-only.
/pcjs.v1Public archive

2019 New Year Release

Latest

Choose a tag to compare

@jeffparjeffpar released this 11 Jan 18:48
· 327 commits to master since this release

This release fixes anautoType problem that crept into at least one PCjs demo (eg, "Turbo Pascal vs. QuickPascal").

The problem: when a PCjs web page is generated by GitHub Pages (which in turn uses Jekyll, which in turn uses the Liquid template language), the page template must perform some simple transformations on the values of properties likeautoType, such as converting "\t" (a traditional tab character) to "\\t", so that by the time the string reaches the key injection code inside PCx86, the tab character is still properly escaped. It also attempts to do the same for backslashes as well, converting "\" to "\\\\". Unfortunately, if you wanted to follow a backslash with a "t", those same simplistic Liquid transformations would misinterpret the combination as "\t".

My solution: rather than continue to fight with the Liquid template language on this (a potentially losing battle), I decided to add another "softkey" to PCx86: $bslash. So the rule of thumb is this: use $bslash to inject a normal backslash, and use actual backslashesonly when specifying one of the following special characters: \r (return), \t (tab), or \x (for hex codes). \n is allowed, too, but it's nothing more than an alias for \r, since PC keyboards don't have an actual linefeed key. In fact, it might be best to avoid backslashes whenever possible, since PCx86 also supports "softkeys" $tab and $enter.

A number of other improvements have crept into PCjs since the last formal release:

That's all for now. Happy New Year!

Assets2
Loading

[8]ページ先頭

©2009-2025 Movatter.jp