Skip to content

Commit 1884cbd

Browse files
author
Martin Brecht-Precht
committed
Updated the SimpleMarkdomEventDispatcher
1 parent 8f73f14 commit 1884cbd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Dispatcher/EventDispatcher/SimpleMarkdomEventDispatcher.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ public function onCodeBlock($code, $hint = null)
100100
$this->onBlockEnd(BlockType::TYPE_CODE);
101101
}
102102

103+
/**
104+
* @param string $comment
105+
* @return void
106+
*/
107+
public function onCommentBlock($comment)
108+
{
109+
$this->onBlockBegin(BlockType::TYPE_COMMENT);
110+
$this->markdomHandler->onCommentBlock($comment);
111+
$this->onBlockEnd(BlockType::TYPE_COMMENT);
112+
}
113+
103114
/**
104115
* @return void
105116
*/

src/Dispatcher/PhpObjectDispatcher.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ private function processBlocks(array $blocks)
8484
$hint = isset($node->hint) ? $node->hint : null;
8585
$this->eventDispatcher->onCodeBlock($node->code, $hint);
8686
break;
87+
case KeyNameTranslator::TYPE_COMMENT:
88+
$this->eventDispatcher->onCommentBlock($node->comment);
89+
break;
8790
case KeyNameTranslator::TYPE_DIVISION:
8891
$this->eventDispatcher->onDivisionBlock();
8992
break;

0 commit comments

Comments
 (0)