Skip to content

Commit 42eeff7

Browse files
committed
Fix 120 chars per line
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 86f2325 commit 42eeff7

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

src/DiffHelper.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ public static function getAvailableTemplates(): array
8484
*
8585
* @return string the difference
8686
*/
87-
public static function calculate($old, $new, string $template = 'Unified', array $diffOptions = [], array $templateOptions = []): string
88-
{
87+
public static function calculate(
88+
$old,
89+
$new,
90+
string $template = 'Unified',
91+
array $diffOptions = [],
92+
array $templateOptions = []
93+
): string {
8994
// always convert into array form
9095
\is_string($old) && ($old = \explode("\n", $old));
9196
\is_string($new) && ($new = \explode("\n", $new));

src/Renderer/Html/LineRenderer/Word.php

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,31 @@ final class Word extends AbstractLineRenderer
1717
public function render(MbString $mbFrom, MbString $mbTo): LineRendererInterface
1818
{
1919
static $punctuationsRange = (
20-
// Latin-1 Supplement ( https://unicode-table.com/en/blocks/latin-1-supplement/ )
20+
// Latin-1 Supplement
21+
// @see https://unicode-table.com/en/blocks/latin-1-supplement/
2122
"\u{0080}-\u{00BB}" .
22-
// Spacing Modifier Letters ( https://unicode-table.com/en/blocks/spacing-modifier-letters/ )
23+
// Spacing Modifier Letters
24+
// @see https://unicode-table.com/en/blocks/spacing-modifier-letters/
2325
"\u{02B0}-\u{02FF}" .
24-
// Combining Diacritical Marks ( https://unicode-table.com/en/blocks/combining-diacritical-marks/ )
26+
// Combining Diacritical Marks
27+
// @see https://unicode-table.com/en/blocks/combining-diacritical-marks/
2528
"\u{0300}-\u{036F}" .
26-
// Small Form Variants ( https://unicode-table.com/en/blocks/small-form-variants/ )
29+
// Small Form Variants
30+
// @see https://unicode-table.com/en/blocks/small-form-variants/
2731
"\u{FE50}-\u{FE6F}" .
28-
// General Punctuation ( https://unicode-table.com/en/blocks/general-punctuation/ )
32+
// General Punctuation
33+
// @see https://unicode-table.com/en/blocks/general-punctuation/
2934
"\u{2000}-\u{206F}" .
30-
// Supplemental Punctuation ( https://unicode-table.com/en/blocks/supplemental-punctuation/ )
35+
// Supplemental Punctuation
36+
// @see https://unicode-table.com/en/blocks/supplemental-punctuation/
3137
"\u{2E00}-\u{2E7F}" .
32-
// CJK Symbols and Punctuation ( https://unicode-table.com/en/blocks/cjk-symbols-and-punctuation/ )
38+
// CJK Symbols and Punctuation
39+
// @see https://unicode-table.com/en/blocks/cjk-symbols-and-punctuation/
3340
"\u{3000}-\u{303F}" .
34-
// Ideographic Symbols and Punctuation ( https://unicode-table.com/en/blocks/ideographic-symbols-and-punctuation/ )
41+
// Ideographic Symbols and Punctuation
42+
// @see https://unicode-table.com/en/blocks/ideographic-symbols-and-punctuation/
3543
"\u{16FE0}-\u{16FFF}" .
36-
// ...
44+
// hmm... seems to be no rule
3745
" \t$,.:;!?'\"()\[\]{}%@<=>_+\-*\/~\\\\|" .
3846
' $,.:;!?’"()[]{}%@<=>_+-*/~\|' .
3947
'「」『』〈〉《》【】()()‘’“”' .

0 commit comments

Comments
 (0)