mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-17 05:07:40 +00:00
* Keyman for Windows 10.0 Open Source * Squashed 'windows/src/ext/jedi/jedi/' content from commit f444ad2 git-subtree-dir: windows/src/ext/jedi/jedi git-subtree-split: f444ad2da4693851e523f1ea6bd541f701904c24 * Squashed 'windows/src/ext/jedi/jcl/' content from commit d63d3c9fd git-subtree-dir: windows/src/ext/jedi/jcl git-subtree-split: d63d3c9fd9ff84efdd8159084ec6a60313644243 * Squashed 'windows/src/ext/jedi/jvcl/' content from commit bee19f3b4 git-subtree-dir: windows/src/ext/jedi/jvcl git-subtree-split: bee19f3b46909fde2fa92c06cd2706f41d99f6c3 * Add required .res files * Add required .res files * Add docbook files (forced) * Add required libxslt * Add required jedi files * Add installation files * Tweak .gitignore for open * CI * Remove KMW from Developer source (#122) * Remove KMW from Developer source (copies during build) * Remove KMW from Developer source (copies during build) * Remove KMW from Developer source (copies during build) * Fixup release build and copy license, readme from kmw during build * Remove obsolete build help documentation * Keyman Engine 10 on Windows regression for shift states (#129) * Improve #128 -- cleaner debug messages * Fixes #127, shift state now resets correctly; and more work for #128 * Fixes #130 (#131)
50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
if( getenv( "KMDOCS_RTF" ) !== false )
|
|
include( "kmhelprtf.php" );
|
|
else
|
|
include( "kmhelphtml.php" );
|
|
|
|
|
|
function FORMAT( $s ) {
|
|
global $nl;
|
|
|
|
$s = str_replace( "\r\n", "\n", $s );
|
|
|
|
$strings = explode( "\n", $s );
|
|
|
|
$func = "";
|
|
$args = "";
|
|
$indent = 0;
|
|
for( $i = 0; $i <= count( $strings ); $i++ ) {
|
|
if( $i < count( $strings ) )
|
|
$s = $strings[$i];
|
|
|
|
$ws = strspn( $s, " " );
|
|
|
|
if( ($ws == 0) && ($s != "") ) {
|
|
if( $func != "" ) {
|
|
/* Call the function with its arguments */
|
|
$args = rtrim( $args );
|
|
dispatcher( $func, $args );
|
|
|
|
$func = "";
|
|
$args = "";
|
|
}
|
|
|
|
/* We're starting a new section here! */
|
|
preg_match( "/^([^:\s]+)(([:\s]\s+)|([:\s]?[\s]*$))/", $s, $matches );
|
|
$func = $matches[1];
|
|
|
|
$len = strlen( $func ) + 1;
|
|
$indent = strspn( substr( $s, $len ), " " ) + $len;
|
|
$args = substr( $s, $indent ) . $nl;
|
|
} else if( $s == "" ) {
|
|
$args .= $nl;
|
|
} else {
|
|
$args .= substr( $s, $indent ) . $nl;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
?>
|