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 1 |
-header 2 |
-header 2 |
+header 1 |
+header 2 |
+header 2 |
-cell 1.1 |
-cell 1.2 |
-cell 1.3 |
+cell 1.1 |
+cell 1.2 |
+cell 1.3 |
-cell 2.1 |
-cell 2.2 |
-cell 2.3 |
+cell 2.1 |
+cell 2.2 |
+cell 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 1 |
+header 1 |
header 2 |
-cell 1.1 |
+cell 1.1 |
cell 1.2 |
-cell 2.1 |
+cell 2.1 |
cell 2.2 |