Skip to content

Commit

Permalink
Added missing list styling
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskonnertz committed Jan 31, 2018
1 parent b11fd06 commit 0741b40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ChrisKonnertz/BBCode/BBCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BBCode
/**
* The current version number
*/
const VERSION = '1.1.0';
const VERSION = '1.1.1';

/**
* The text with BBCodes
Expand Down Expand Up @@ -371,7 +371,9 @@ protected function generateTag(Tag $tag, &$html, Tag $openingTag = null, array $
if ($tag->property) {
$listType = '<ol>';

if ($tag->property == 'a') {
if ($tag->property == 'i') {
$listType = '<ol style="list-style-type: lower-roman">';
} elseif ($tag->property == 'a') {
$listType = '<ol style="list-style-type: lower-alpha">';
}
}
Expand All @@ -382,6 +384,8 @@ protected function generateTag(Tag $tag, &$html, Tag $openingTag = null, array $
$code = '</ul>';
} elseif ($this->endsWith($html, '<ol>')) {
$code = '</ol>';
} elseif ($this->endsWith($html, '<ol style="list-style-type: lower-roman">')) {
$code = '</ol>';
} elseif ($this->endsWith($html, '<ol style="list-style-type: lower-alpha">')) {
$code = '</ol>';
} elseif ($this->endsWith($html, '</li>') and $openingTag->property) {
Expand Down

0 comments on commit 0741b40

Please sign in to comment.