Skip to content

Commit

Permalink
Expose heading_level in BbHeading
Browse files Browse the repository at this point in the history
  • Loading branch information
qurben committed Feb 16, 2021
1 parent 7231293 commit 865227d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/tag/BbHeading.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function parse($arguments= []) {
}
}

public function getHeadingLevel() {
return $this->heading_level;
}

public function render() {
$id = $this->id == null ? '' : ' id="' . htmlspecialchars($this->id) . '"';
$text = "<h$this->heading_level$id class=\"bb-tag-h\">{$this->getContent()}</h$this->heading_level>\n\n";
Expand Down
2 changes: 1 addition & 1 deletion src/tag/BbList.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function render() {
if ($this->type == null) {
return "<ul class=\"bb-tag-list\">{$this->getContent()}</ul>";
} else {
return "<ol class=\"bb-tag-list\" \"type=\"$this->type\" >{$this->getContent()}</ol>";
return "<ol class=\"bb-tag-list\" type=\"$this->type\" >{$this->getContent()}</ol>";
}

}
Expand Down

0 comments on commit 865227d

Please sign in to comment.