File tree Expand file tree Collapse file tree 6 files changed +10
-12
lines changed Expand file tree Collapse file tree 6 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ gradle-app.setting
453
453
454
454
# #### Composer
455
455
composer.phar
456
- / vendor /
456
+ vendor /
457
457
458
458
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
459
459
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
@@ -465,7 +465,7 @@ composer.lock
465
465
#
466
466
# Recommended template: PHP.gitignore
467
467
468
- /wpcs /*
468
+ * /wpcs /*
469
469
470
470
# #### SASS
471
471
.sass-cache /
Original file line number Diff line number Diff line change 1
1
<?php
2
-
3
2
/**
4
3
* This file is part of MultiCodeBlock.
5
4
*
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function &highlight(\Highlight\Highlighter &$hl) {
48
48
* @param string $code The code that should be inserted into the class
49
49
* @param string $lang The language the code is written in.
50
50
*/
51
- public function setCode (string $ code , string &$ lang ) {
51
+ public function setCode (string & $ code , string &$ lang ) {
52
52
$ this ->code = $ code ;
53
53
$ this ->lang = $ lang ;
54
54
}
Original file line number Diff line number Diff line change 10
10
* Protect against register_globals vulnerabilities.
11
11
* This line must be present before any global variable is referenced.
12
12
*/
13
- if ( !defined ( 'MEDIAWIKI ' ) ) {
14
- echo ( "This is an extension to the MediaWiki package and cannot be run standalone. \n" );
15
- die ( -1 );
16
- }
17
13
18
14
/**
19
15
* The hooks class for the MultiCodeBlock MediaWiki-Extension.
@@ -24,7 +20,7 @@ class MultiCodeBlockHooks {
24
20
/**
25
21
* Sets a hook for the MediaWiki parser to be able to use the <multicodeblock>-Tag in the MediaWiki syntax.
26
22
*
27
- * @param Parser & $parser The Parser Element as a reference.
23
+ * @param Parser $parser The Parser Element as a reference.
28
24
*/
29
25
public static function onParserFirstCallInit ( Parser &$ parser ) {
30
26
$ parser ->setHook ( 'multicodeblock ' , [ self ::class, 'renderMultiCodeBlock ' ] );
Original file line number Diff line number Diff line change 21
21
"basic" : " BASIC" ,
22
22
"bnf" : " BNF" ,
23
23
"brainfuck" : " Brainfuck" ,
24
+ "c" : " C" ,
24
25
"cal" : " C/AL" ,
25
26
"capnproto" : " Cap’n Proto" ,
26
27
"ceylon" : " Ceylon" ,
Original file line number Diff line number Diff line change 11
11
*
12
12
* @param string $content The content that should be parsed by the DOM-Parser
13
13
*
14
- * @return PHPHtmlParser\Dom The DOM-Element that has the HTML-Tree
14
+ * @return DOMDocument The DOM-Element that has the HTML-Tree
15
15
*/
16
- function getDOM (&$ content ) {
16
+ function getDOM (string &$ content ) {
17
17
$ dom = new DOMDocument ();
18
18
19
19
$ dom ->validateOnParse = false ;
@@ -26,7 +26,9 @@ function getDOM(&$content) {
26
26
}
27
27
28
28
/**
29
- * Returns the code in the `<code>` tags.
29
+ * Returns all of the blocks with code inside.
30
+ * They are determined by having the
31
+ * `<code>{code}</code>`-structure.
30
32
*
31
33
* @param string $codeblock The object where all of the codeblocks should be removed.
32
34
*
You can’t perform that action at this time.
0 commit comments