-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring: rename namespace to Contributte, simplify CI & composer
- Loading branch information
Showing
12 changed files
with
217 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# Top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# JS / PHP | ||
[*.{js,php,phpt}] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
# NEON | ||
[*.neon] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
# Composer, NPM, Travis, BitbucketPipelines | ||
[{composer.json,package.json,.travis.yml,bitbucket-pipelines.yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Contributte | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,41 @@ | ||
{ | ||
"name": "minetro/latte-parsedown-extra", | ||
"name": "contributte/latte-parsedown-extra", | ||
"description": "ParsedownExtra parser for Latte", | ||
"type": "library", | ||
"license": ["BSD-3-Clause"], | ||
"homepage": "https://github.com/minetro/latte-parsedown-extra", | ||
"homepage": "https://github.com/contributte/latte-parsedown-extra", | ||
"authors": [ | ||
{ | ||
"name": "Milan Felix Sulc", | ||
"homepage": "http://jfx.cz" | ||
"homepage": "https://f3l1x.io" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.6.0", | ||
"nette/di": "~2.4.0", | ||
"nette/utils": "~2.4.0", | ||
"nette/di": "^2.4.9", | ||
"nette/utils": "^2.4.7", | ||
"erusev/parsedown-extra": "^0.7.1", | ||
"erusev/parsedown": "^1.6.0" | ||
"erusev/parsedown": "^1.6.3" | ||
}, | ||
"require-dev": { | ||
"nette/tester": "~1.7.0" | ||
"ninjify/qa": "^0.4.0", | ||
"ninjify/nunjuck": "^0.1.4" | ||
}, | ||
"autoload": { | ||
"classmap": ["src/"] | ||
"psr-4": { | ||
"Contributte\\Parsedown\\": "src/" | ||
} | ||
}, | ||
"scripts": { | ||
"qa": [ | ||
"linter src tests", | ||
"codesniffer src tests" | ||
], | ||
"tester": [ | ||
"tester -s -p php --colors 1 -c tests/php-unix.ini tests/cases" | ||
], | ||
"tester-coverage": [ | ||
"tester -s -p php --colors 1 -c tests/php-unix.ini -d extension=xdebug.so --coverage ./coverage.xml --coverage-src ./src tests/cases" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
<?php | ||
|
||
namespace Minetro\Parsedown; | ||
namespace Contributte\Parsedown; | ||
|
||
use Nette\Object; | ||
use Nette\SmartObject; | ||
use ParsedownExtra; | ||
|
||
/** | ||
* ParsedownExtra Adapter | ||
* | ||
* @author Milan Felix Sulc <[email protected]> | ||
* @method onProcess(string $text, ParsedownExtraAdapter $adapter); | ||
* @method void onProcess(string $text, ParsedownExtraAdapter $adapter) | ||
*/ | ||
class ParsedownExtraAdapter extends Object | ||
class ParsedownExtraAdapter | ||
{ | ||
|
||
/** @var ParsedownExtra */ | ||
private $parsedown; | ||
|
||
/** @var array */ | ||
public $onProcess = []; | ||
|
||
public function __construct() | ||
{ | ||
$this->parsedown = new ParsedownExtra(); | ||
} | ||
|
||
/** | ||
* @param mixed $text | ||
* @param string | ||
*/ | ||
public function process($text) | ||
{ | ||
$this->onProcess($text, $this); | ||
return $this->parsedown->parse($text); | ||
} | ||
|
||
/** | ||
* @param mixed $line | ||
* @param string | ||
*/ | ||
public function processLine($line) | ||
{ | ||
$this->onProcess($line, $this); | ||
return $this->parsedown->line($line); | ||
} | ||
} | ||
use SmartObject; | ||
|
||
/** @var ParsedownExtra */ | ||
private $parsedown; | ||
|
||
/** @var array */ | ||
public $onProcess = []; | ||
|
||
/** | ||
* Creates adapter | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->parsedown = new ParsedownExtra(); | ||
} | ||
|
||
/** | ||
* @param mixed $text | ||
* @return mixed | ||
*/ | ||
public function process($text) | ||
{ | ||
$this->onProcess($text, $this); | ||
|
||
return $this->parsedown->parse($text); | ||
} | ||
|
||
/** | ||
* @param mixed $line | ||
* @return string | ||
*/ | ||
public function processLine($line) | ||
{ | ||
$this->onProcess($line, $this); | ||
|
||
return $this->parsedown->line($line); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.