~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to libphutil/src/markup/engine/remarkup/blockrule/PhutilRemarkupHorizontalRuleBlockRule.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-01-29 00:15:58 UTC
  • mfrom: (0.14.1) (0.13.1) (0.10.2) (2.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150129001558-7qklhtcc043y9mog
Tags: 0~git20150129-1
* New snapshot release
* restricted access to local config file (closes: #775479)
* moved local config file to /var/lib/phabricator (closes: #775478)
* switched mysql-server dependency to recommends (closes: #773536)
* use /run instead of /var/run (closes: #775803)
* prevent package reinstall from overwritting local changes (closes: #776288)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
  public function getMatchingLineCount(array $lines, $cursor) {
15
15
    $num_lines = 0;
16
 
    $pattern = '/^_{3,}$|^\*\s?\*\s?\*(\s|\*)*$|^\-\s?\-\s?\-(\s|\-)*$/';
 
16
    $pattern = '/^\s*(?:_{3,}|\*\s?\*\s?\*(\s|\*)*|\-\s?\-\s?\-(\s|\-)*)$/';
17
17
    if (preg_match($pattern, rtrim($lines[$cursor], "\n\r"))) {
18
18
      $num_lines++;
19
19
      $cursor++;
27
27
  }
28
28
 
29
29
  public function markupText($text, $children) {
 
30
    if ($this->getEngine()->isTextMode()) {
 
31
      return rtrim($text);
 
32
    }
 
33
 
30
34
    return phutil_tag('hr', array('class' => 'remarkup-hr'));
31
35
  }
32
36