Smart.Framework Logo

final class \SmartMarkdownToHTML
{ } ->

Class: SmartMarkdownToHTML - Exports Markdown (v2, smart flavour) Code to HTML Code.


class Methods

public function __construct ( bool $y_sBreakEnabled = true, bool $y_mediaExtraEnabled = true, bool $y_lazyLoadImgDisabled = false, string $y_renderOptions = null, string $y_relative_url_prefix = null, bool $y_log_render_notices = false, array $y_arr_preserve_extra_syntax = null, bool $y_useCompatibilityMode = false ) {} @ 
Class constructor with many options
public function parse ( string $text ) {} -> STRING
@return: {STRING} HTML code
@param: {STRING} $text: The Markdown to be processed
Converts Markdown to HTML

class Properties


class Constants

public const ESCAPINGS_REPLACEMENTS = ["\\\\" => "\\", "\\_" => "_", "\\*" => "*", "\\-" => "-", "\\+" => "+", "\\=" => "=", "\\`" => "`", "\\~" => "~", "\\!" => "!", "\\?" => "?", "\\#" => "#", "\\$" => "$", "\\@" => "@", "\\%" => "%", "\\^" => "^", "\\(" => "(", "\\)" => ")", "\\[" => "[", "\\]" => "]", "\\{" => "{", "\\}" => "}", "\\." => ".", "\\," => ",", "\\:" => ":", "\\;" => ";", "\\<\\<\\<" => "<<<"] ;  ::

Sample code: PHP

<?php

$markdown 
= new SmartMarkdownToHTML();
 
$html $markdown->parse('Hello **SmartMarkdownToHTML** !');
 
// $html would be (default):                 '<div class="mkdw-line">Hello <b>SmartMarkdownToHTML</b> !</div>'
 // or if set with paragraphs $html would be: '<p>Hello <b>SmartMarkdownToHTML</b> !</p>' <!-- paragraphs cannot be nested like divs, but is just another option ... -->

// #end php code


documentation generated on: 2023-10-19 23:15:45 +0000


Smart.Framework © 2009-2023 unix-world.org