Skip to content

Commit ec0bce3

Browse files
authored
Merge pull request #424 from phalcon/3.x
3.4.0
2 parents 73f7121 + 8c18860 commit ec0bce3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+529
-70
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
/humbuglog.json
1717
/humbuglog.txt
1818
/composer.phar
19-
/composer.lock
2019
/public/robots.txt
2120
/public/sitemap.xml
2221
/public/google*.html

.htrouter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+------------------------------------------------------------------------+
55
| Phosphorum |
66
+------------------------------------------------------------------------+
7-
| Copyright (c) 2013-2017 Phalcon Team and contributors |
7+
| Copyright (c) 2013-present Phalcon Team and contributors |
88
+------------------------------------------------------------------------+
99
| This source file is subject to the New BSD License that is bundled |
1010
| with this package in the file LICENSE.txt. |

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ language: php
33
sudo: false
44
dist: trusty
55

6+
# TODO: Add 7.2 after Phalcon 3.3.0 release
67
php:
78
- 5.6
89
- 7.0
9-
- 7.1
10+
- 7.1.11
1011

1112
git:
1213
depth: 1

app/cache/views/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/library/Markdown/Markdown.php

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+------------------------------------------------------------------------+
55
| Phosphorum |
66
+------------------------------------------------------------------------+
7-
| Copyright (c) 2013-2017 Phalcon Team and contributors |
7+
| Copyright (c) 2013-present Phalcon Team and contributors |
88
+------------------------------------------------------------------------+
99
| This source file is subject to the New BSD License that is bundled |
1010
| with this package in the file LICENSE.txt. |
@@ -32,6 +32,34 @@ public function __construct()
3232

3333
$this->InlineTypes['@'][]= 'UrlMentions';
3434
$this->inlineMarkerList .= '@';
35+
36+
$this->InlineTypes['~'][]= 'InsTags';
37+
$this->inlineMarkerList .= '~';
38+
}
39+
40+
/**
41+
* Extension Added <del> tag to HTML tree
42+
*
43+
* Using in editor:
44+
* Foo ~Some code~ Bar
45+
*
46+
* Result in HTML tree:
47+
* Foo <del>Some code</del> Bar
48+
*
49+
* @param array $excerpt
50+
* @return array
51+
*/
52+
protected function inlineStrikethrough($Excerpt)
53+
{
54+
if (preg_match('/^~{1}([^~].*?)~{1}/', $Excerpt['text'], $matches)) {
55+
return [
56+
'extent' => strlen($matches[0]),
57+
'element' => [
58+
'name' => 'del',
59+
'text' => $matches[1],
60+
],
61+
];
62+
}
3563
}
3664

3765
/**
@@ -68,6 +96,32 @@ protected function inlineUrlMentions($excerpt)
6896
}
6997
}
7098

99+
/**
100+
* Extension Added <ins> tag to HTML tree
101+
*
102+
* Using in editor:
103+
* Foo ~~Some code~~ Bar
104+
*
105+
* Result in HTML tree:
106+
* Foo <ins>Some code</ins> Bar
107+
*
108+
* @param array $excerpt
109+
* @return array
110+
*/
111+
protected function inlineInsTags($excerpt)
112+
{
113+
if (preg_match('/^~{2}(.*?)~{2}/', $excerpt['text'], $matches)) {
114+
//var_dump($excerpt);
115+
return [
116+
'extent' => strlen($matches[0]),
117+
'element' => [
118+
'name' => 'ins',
119+
'text' => $matches[1],
120+
],
121+
];
122+
}
123+
}
124+
71125
/* Escaping text, to prevent adding injection
72126
* @todo: the below code should be deleted after include it to the major class.
73127
* Please insert other extension above this code block

app/library/Version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+------------------------------------------------------------------------+
55
| Phosphorum |
66
+------------------------------------------------------------------------+
7-
| Copyright (c) 2013-2016 Phalcon Team and contributors |
7+
| Copyright (c) 2013-present Phalcon Team and contributors |
88
+------------------------------------------------------------------------+
99
| This source file is subject to the New BSD License that is bundled |
1010
| with this package in the file LICENSE.txt. |
@@ -34,7 +34,7 @@ class Version extends PhVersion
3434
*/
3535
protected static function _getVersion()
3636
{
37-
return [3, 3, 2, 0, 0];
37+
// @codingStandardsIgnoreEnd
38+
return [3, 4, 0, 0, 0];
3839
}
39-
// @codingStandardsIgnoreEnd
4040
}

app/views/help/markdown.volt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ This [link][id2] has title attribute.
211211
</p>
212212
<p>
213213
<pre>
214+
My favorite color is ~blue~ ~~red~~!
215+
</pre>
216+
<pre>
214217
My favorite color is <del>blue</del> <ins>red</ins>!
215218
</pre>
216219
</p>
@@ -221,6 +224,9 @@ My favorite color is <del>blue</del> <ins>red</ins>!
221224
</p>
222225
<p>
223226
<pre>
227+
My favorite color is ~blue~ ~~red~~!
228+
</pre>
229+
<pre>
224230
My favorite color is <del>blue</del> <ins>red</ins>!
225231
</pre>
226232
</p>

app/views/index.volt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
{{- stylesheet_link("css/octicons.css?v=" ~ forum_version(), true) -}}
3535
{{- stylesheet_link("css/diff.css?v=" ~ forum_version(), true) -}}
3636
{{- stylesheet_link("css/style.css?v=" ~ forum_version(), true) -}}
37+
{{- stylesheet_link("css/prism.css?v=" ~ forum_version(), true) -}}
3738

3839
{#- reCaptcha -#}
3940
{%- if recaptcha.isEnabled() -%}
@@ -47,6 +48,7 @@
4748
<script type="text/javascript" src="//cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](prettify.js+lang-css.js+lang-sql.js+lang-yaml.js)"></script>
4849
{{ javascript_include("js/editor.js?v=" ~ forum_version()) }}
4950
{{ javascript_include("js/forum.js?v=" ~ forum_version()) }}
51+
{{ javascript_include("js/prism.js?v=" ~ forum_version()) }}
5052

5153
<script type="text/javascript">Forum.initializeView('{{ url() }}');</script>
5254
</body>

bootstrap/autoloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+------------------------------------------------------------------------+
55
| Phosphorum |
66
+------------------------------------------------------------------------+
7-
| Copyright (c) 2013-2017 Phalcon Team and contributors |
7+
| Copyright (c) 2013-present Phalcon Team and contributors |
88
+------------------------------------------------------------------------+
99
| This source file is subject to the New BSD License that is bundled |
1010
| with this package in the file LICENSE.txt. |
@@ -25,7 +25,7 @@
2525
*/
2626
define('APP_START_MEMORY', memory_get_usage());
2727

28-
// Register The Composer Auto Loader
28+
// Then register the Composer autoloader
2929
require dirname(__DIR__) . '/vendor/autoload.php';
3030

3131
// Load environment

bootstrap/error_polyfill.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)