From b4a8eb3315afe3b60feff888dc3c73054942bfba Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Fri, 16 Jan 2015 00:04:18 +0200 Subject: [PATCH] resolve #156 --- Parsedown.php | 4 ++-- test/data/aligned_table.html | 18 +++++++++--------- test/data/simple_table.html | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index dbb8508..c5c988a 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -857,7 +857,7 @@ class Parsedown $alignment = $alignments[$index]; $HeaderElement['attributes'] = array( - 'align' => $alignment, + 'style' => 'text-align: '.$alignment.';', ); } @@ -927,7 +927,7 @@ class Parsedown if (isset($Block['alignments'][$index])) { $Element['attributes'] = array( - 'align' => $Block['alignments'][$index], + 'style' => 'text-align: '.$Block['alignments'][$index].';', ); } diff --git a/test/data/aligned_table.html b/test/data/aligned_table.html index 0657bd1..c4acfcb 100644 --- a/test/data/aligned_table.html +++ b/test/data/aligned_table.html @@ -1,21 +1,21 @@ - - - + + + - - - + + + - - - + + +
header 1header 2header 2header 1header 2header 2
cell 1.1cell 1.2cell 1.3cell 1.1cell 1.2cell 1.3
cell 2.1cell 2.2cell 2.3cell 2.1cell 2.2cell 2.3
\ No newline at end of file diff --git a/test/data/simple_table.html b/test/data/simple_table.html index 64b7a9a..237d7ef 100644 --- a/test/data/simple_table.html +++ b/test/data/simple_table.html @@ -20,17 +20,17 @@ - + - + - +
header 1header 1 header 2
cell 1.1cell 1.1 cell 1.2
cell 2.1cell 2.1 cell 2.2