Skip to content

Commit

Permalink
allow a listblock to start with more than one * or # sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorsten Staerk committed Nov 21, 2010
1 parent 1e98ecc commit 83e507e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ Change history:
2010-10-26: 1 hour: allow a listitem directly under a codeblock
2010-10-28: 1 hour: allow a codeblock directly under a listitem
2010-10-30: 2 hours: made toolbar work
2010-11-21: 1 hour: listblock starting with two ** works now, see https://github.com/tstaerk/mediasyntax/issues#issue/1
4 changes: 3 additions & 1 deletion syntax/listblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ function getAllowedTypes()

function connectTo($mode)
{
// a list block starts with a new line starting with one or more * or # signs
$this->Lexer->addEntryPattern(
'\n[ \t]*[\#\*](?!\*) *',
'\n[ \t]*[\#\*]+ *',
$mode,
'plugin_mediasyntax_listblock'
);
// a list block continues as long as the following lines start with one or more * or # signs
$this->Lexer->addPattern(
'\n[ \t]*[\#\*\-]+ *',
'plugin_mediasyntax_listblock'
Expand Down

0 comments on commit 83e507e

Please sign in to comment.