composer update. PointParser updated to match new version of markdown library.

This commit is contained in:
Alexey Skobkin 2016-12-11 03:20:55 +03:00
parent 5671092c81
commit 6d8e17b114
4 changed files with 475 additions and 344 deletions

View file

@ -446,6 +446,12 @@ class SymfonyRequirements extends RequirementCollection
); );
} }
$this->addRequirement(
function_exists('iconv'),
'iconv() must be available',
'Install and enable the <strong>iconv</strong> extension.'
);
$this->addRequirement( $this->addRequirement(
function_exists('json_encode'), function_exists('json_encode'),
'json_encode() must be available', 'json_encode() must be available',
@ -546,10 +552,10 @@ class SymfonyRequirements extends RequirementCollection
require_once __DIR__.'/../vendor/autoload.php'; require_once __DIR__.'/../vendor/autoload.php';
try { try {
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');
$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
} catch (\ReflectionException $e) { } catch (ReflectionException $e) {
$contents = ''; $contents = '';
} }
$this->addRecommendation( $this->addRecommendation(

View file

@ -6,7 +6,7 @@ $lineSize = 70;
$symfonyRequirements = new SymfonyRequirements(); $symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath(); $iniPath = $symfonyRequirements->getPhpIniConfigPath();
echo_title('Symfony2 Requirements Checker'); echo_title('Symfony Requirements Checker');
echo '> PHP is using the following php.ini file:'.PHP_EOL; echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) { if ($iniPath) {
@ -42,9 +42,9 @@ foreach ($symfonyRequirements->getRecommendations() as $req) {
} }
if ($checkPassed) { if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects'); echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else { } else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects'); echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
echo_title('Fix the following mandatory requirements', 'red'); echo_title('Fix the following mandatory requirements', 'red');

771
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -73,35 +73,27 @@ class PointParser extends MarkdownParser
/** /**
* Point.im breaks Markdown double line wrap rule * Point.im breaks Markdown double line wrap rule
* * {@inheritdoc}
* @param $text
*
* @return mixed
*/ */
protected function formParagraphs($text) { protected function formParagraphs($text, $wrap_in_p = true) {
# // Strip leading and trailing lines:
# Params:
# $text - string to process with html <p> tags
#
# Strip leading and trailing lines:
$text = preg_replace('/\A\n+|\n+\z/', '', $text); $text = preg_replace('/\A\n+|\n+\z/', '', $text);
$grafs = preg_split('/\n+/', $text, -1, PREG_SPLIT_NO_EMPTY); $grafs = preg_split('/\n+/', $text, -1, PREG_SPLIT_NO_EMPTY);
# // Wrap <p> tags and unhashify HTML blocks
# Wrap <p> tags and unhashify HTML blocks
#
foreach ($grafs as $key => $value) { foreach ($grafs as $key => $value) {
if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { if (!preg_match('/^B\x1A[0-9]+B$/', $value)) {
# Is a paragraph. // Is a paragraph.
$value = $this->runSpanGamut($value); $value = $this->runSpanGamut($value);
if ($wrap_in_p) {
$value = preg_replace('/^([ ]*)/', "<p>", $value); $value = preg_replace('/^([ ]*)/', "<p>", $value);
$value .= "</p>"; $value .= "</p>";
$grafs[$key] = $this->unhash($value);
} }
else { $grafs[$key] = $this->unhash($value);
# Is a block. } else {
# Modify elements of @grafs in-place... // Is a block.
// Modify elements of @grafs in-place...
$graf = $value; $graf = $value;
$block = $this->html_hashes[$graf]; $block = $this->html_hashes[$graf];
$graf = $block; $graf = $block;