Skip to content
Snippets Groups Projects
Select Git revision
  • 7ecbeb118c6b8ec2b9ba4834b4eb06a51a169794
  • main default protected
  • 1-fix-assignment-errors
  • testsfail
4 results

settings.gradle

Blame
  • Parsedown.php 50.82 KiB
    <?php
    
    #
    #
    # Parsedown
    # http://parsedown.org
    #
    # (c) Emanuil Rusev
    # http://erusev.com
    #
    # For the full license information, view the LICENSE file that was distributed
    # with this source code.
    #
    #
    
    class Parsedown
    {
        # ~
    
        const version = '1.8.0-beta-7';
    
        # ~
    
        function text($text)
        {
            $Elements = $this->textElements($text);
    
            # convert to markup
            $markup = $this->elements($Elements);
    
            # trim line breaks
            $markup = trim($markup, "\n");
    
            return $markup;
        }
    
        protected function textElements($text)
        {
            # make sure no definitions are set
            $this->DefinitionData = array();
    
            # standardize line breaks
            $text = str_replace(array("\r\n", "\r"), "\n", $text);
    
            # remove surrounding line breaks
            $text = trim($text, "\n");
    
            # split text into lines
            $lines = explode("\n", $text);
    
            # iterate through lines to identify blocks
            return $this->linesElements($lines);
        }
    
        #
        # Setters
        #
    
        function setBreaksEnabled($breaksEnabled)
        {
            $this->breaksEnabled = $breaksEnabled;
    
            return $this;
        }
    
        protected $breaksEnabled;
    
        function setMarkupEscaped($markupEscaped)
        {
            $this->markupEscaped = $markupEscaped;