Skip to content

Commit

Permalink
Added option for narrow and deep annotation container, but the syntax…
Browse files Browse the repository at this point in the history
… anables any other classes to be set in annotation container for user-defined container.

\
  • Loading branch information
turnermm committed Jan 18, 2019
1 parent 3d7b151 commit 3f0d4f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions style.css
Expand Up @@ -6,6 +6,12 @@
padding: 8px;
display: none;
}
.anno_narrow{
height: 60px;
}
.anno_deep{
height: 160px;
}
#anno_close {
min-width: 590px;
background-color: #eee;
Expand Down
6 changes: 5 additions & 1 deletion syntax/anno.php
Expand Up @@ -51,6 +51,10 @@ public function connectTo($mode) {
'<@anno:\d\d?>(?=.*?</@anno>)',$mode,
'plugin_annotate_anno');

$this->Lexer->addEntryPattern(
'<@anno:\[\d\d?;;\w+\]>(?=.*?</@anno>)',$mode,
'plugin_annotate_anno');

$this->Lexer->addSpecialPattern(
'<anno:\d\d?>.*?</anno>',$mode,'plugin_annotate_anno');

Expand All @@ -68,7 +72,7 @@ function handle($match, $state, $pos, Doku_Handler $handler){

switch($state) {
case DOKU_LEXER_ENTER :
$match = str_replace(':','_',substr($match,2,-1));
$match = str_replace(array(':', ';', '[' , ']'), array('_'," ","",""),substr($match,2,-1));
return array($state, $match);
case DOKU_LEXER_UNMATCHED :
if(preg_match("/<top>([\w\:]+)\<\/top\>/m",$match,$matches)) {
Expand Down

0 comments on commit 3f0d4f3

Please sign in to comment.