Remove jonnybarnes/unicode-tools
dependency
This commit is contained in:
parent
d09e63d509
commit
c815d40be4
5 changed files with 5 additions and 55 deletions
|
@ -3,7 +3,6 @@
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Jonnybarnes\UnicodeTools\UnicodeTools;
|
|
||||||
use League\CommonMark\CommonMarkConverter;
|
use League\CommonMark\CommonMarkConverter;
|
||||||
use MartinBean\Database\Eloquent\Sluggable;
|
use MartinBean\Database\Eloquent\Sluggable;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
@ -57,9 +56,8 @@ class Article extends Model
|
||||||
*/
|
*/
|
||||||
public function getMainAttribute($value)
|
public function getMainAttribute($value)
|
||||||
{
|
{
|
||||||
$unicode = new UnicodeTools();
|
|
||||||
$markdown = new CommonMarkConverter();
|
$markdown = new CommonMarkConverter();
|
||||||
$html = $markdown->convertToHtml($unicode->convertUnicodeCodepoints($value));
|
$html = $markdown->convertToHtml($value);
|
||||||
//change <pre><code>[lang] ~> <pre><code data-language="lang">
|
//change <pre><code>[lang] ~> <pre><code data-language="lang">
|
||||||
$match = '/<pre><code>\[(.*)\]\n/';
|
$match = '/<pre><code>\[(.*)\]\n/';
|
||||||
$replace = '<pre><code class="language-$1">';
|
$replace = '<pre><code class="language-$1">';
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace App;
|
||||||
use Normalizer;
|
use Normalizer;
|
||||||
use Jonnybarnes\IndieWeb\Numbers;
|
use Jonnybarnes\IndieWeb\Numbers;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Jonnybarnes\UnicodeTools\UnicodeTools;
|
|
||||||
use League\CommonMark\CommonMarkConverter;
|
use League\CommonMark\CommonMarkConverter;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
|
use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
|
||||||
|
@ -98,10 +97,8 @@ class Note extends Model implements HasMedia
|
||||||
*/
|
*/
|
||||||
public function getNoteAttribute($value)
|
public function getNoteAttribute($value)
|
||||||
{
|
{
|
||||||
$unicode = new UnicodeTools();
|
|
||||||
$codepoints = $unicode->convertUnicodeCodepoints($value);
|
|
||||||
$markdown = new CommonMarkConverter();
|
$markdown = new CommonMarkConverter();
|
||||||
$html = $markdown->convertToHtml($codepoints);
|
$html = $markdown->convertToHtml($value);
|
||||||
$hcards = $this->makeHCards($html);
|
$hcards = $this->makeHCards($html);
|
||||||
$hashtags = $this->autoLinkHashtag($hcards);
|
$hashtags = $this->autoLinkHashtag($hcards);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
## Version {next}
|
## Version {next}
|
||||||
- Better tag normalization code organisation
|
- Better tag normalization code organisation
|
||||||
|
- Remove `jonnybarnes/unicode-tools` dependency and clean up relevant code
|
||||||
|
|
||||||
## Version 0.0.2 (2016-05-25)
|
## Version 0.0.2 (2016-05-25)
|
||||||
- Fix issue#1: tagged notes page needs the tag from the URL normalizing.
|
- Fix issue#1: tagged notes page needs the tag from the URL normalizing.
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
"ext-intl": "*",
|
"ext-intl": "*",
|
||||||
"php": ">=7.0.0",
|
"php": ">=7.0.0",
|
||||||
"laravel/framework": "5.2.*",
|
"laravel/framework": "5.2.*",
|
||||||
"jonnybarnes/unicode-tools": "dev-master",
|
|
||||||
"jonnybarnes/indieweb": "dev-master",
|
"jonnybarnes/indieweb": "dev-master",
|
||||||
"jonnybarnes/webmentions-parser": "dev-master",
|
"jonnybarnes/webmentions-parser": "dev-master",
|
||||||
"guzzlehttp/guzzle": "~6.0",
|
"guzzlehttp/guzzle": "~6.0",
|
||||||
|
|
49
composer.lock
generated
49
composer.lock
generated
|
@ -4,8 +4,8 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "52bfae9a802b8b7a53d83918045a0d67",
|
"hash": "ae25cd7787df367a650bf7dc2fa74227",
|
||||||
"content-hash": "08624d66bf872209171586433dfd5150",
|
"content-hash": "7982802429d5fe540f528ec69c3d84d2",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "anahkiasen/underscore-php",
|
"name": "anahkiasen/underscore-php",
|
||||||
|
@ -1085,50 +1085,6 @@
|
||||||
],
|
],
|
||||||
"time": "2016-01-14 15:10:20"
|
"time": "2016-01-14 15:10:20"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "jonnybarnes/unicode-tools",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/jonnybarnes/unicode-tools.git",
|
|
||||||
"reference": "0f469c30cb9a40a1cb578f893b3af1abc1a6ff53"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/jonnybarnes/unicode-tools/zipball/0f469c30cb9a40a1cb578f893b3af1abc1a6ff53",
|
|
||||||
"reference": "0f469c30cb9a40a1cb578f893b3af1abc1a6ff53",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "3.7.*"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Jonnybarnes\\UnicodeTools": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jonny Barnes",
|
|
||||||
"email": "jonny@jonnybarnes.net"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Turns Unicode codepoints into raw utf-8 multibyte characters",
|
|
||||||
"homepage": "https://github.com/jonnybarnes/unicode-tools",
|
|
||||||
"keywords": [
|
|
||||||
"unicode",
|
|
||||||
"utf-8"
|
|
||||||
],
|
|
||||||
"time": "2013-07-18 15:32:42"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "jonnybarnes/webmentions-parser",
|
"name": "jonnybarnes/webmentions-parser",
|
||||||
"version": "dev-master",
|
"version": "dev-master",
|
||||||
|
@ -5351,7 +5307,6 @@
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {
|
"stability-flags": {
|
||||||
"jonnybarnes/unicode-tools": 20,
|
|
||||||
"jonnybarnes/indieweb": 20,
|
"jonnybarnes/indieweb": 20,
|
||||||
"jonnybarnes/webmentions-parser": 20
|
"jonnybarnes/webmentions-parser": 20
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue