mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-60239 libraries: upgrade MD library to 1.7.0
This commit is contained in:
parent
22e99d61ca
commit
503ce10cad
@ -1,11 +1,11 @@
|
||||
PHP Markdown Lib
|
||||
Copyright (c) 2004-2015 Michel Fortin
|
||||
Copyright (c) 2004-2016 Michel Fortin
|
||||
<https://michelf.ca/>
|
||||
All rights reserved.
|
||||
|
||||
Based on Markdown
|
||||
Copyright (c) 2003-2006 John Gruber
|
||||
<http://daringfireball.net/>
|
||||
<https://daringfireball.net/>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,38 @@
|
||||
<?php
|
||||
#
|
||||
# Markdown - A text-to-HTML conversion tool for web writers
|
||||
#
|
||||
# PHP Markdown
|
||||
# Copyright (c) 2004-2015 Michel Fortin
|
||||
# <https://michelf.ca/projects/php-markdown/>
|
||||
#
|
||||
# Original Markdown
|
||||
# Copyright (c) 2004-2006 John Gruber
|
||||
# <https://daringfireball.net/projects/markdown/>
|
||||
#
|
||||
/**
|
||||
* Markdown - A text-to-HTML conversion tool for web writers
|
||||
*
|
||||
* @package php-markdown
|
||||
* @author Michel Fortin <michel.fortin@michelf.com>
|
||||
* @copyright 2004-2016 Michel Fortin <https://michelf.com/projects/php-markdown/>
|
||||
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
|
||||
*/
|
||||
|
||||
namespace Michelf;
|
||||
|
||||
|
||||
#
|
||||
# Markdown Parser Interface
|
||||
#
|
||||
|
||||
/**
|
||||
* Markdown Parser Interface
|
||||
*/
|
||||
interface MarkdownInterface {
|
||||
/**
|
||||
* Initialize the parser and return the result of its transform method.
|
||||
* This will work fine for derived classes too.
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
public static function defaultTransform($text);
|
||||
|
||||
#
|
||||
# Initialize the parser and return the result of its transform method.
|
||||
# This will work fine for derived classes too.
|
||||
#
|
||||
public static function defaultTransform($text);
|
||||
|
||||
#
|
||||
# Main function. Performs some preprocessing on the input text
|
||||
# and pass it through the document gamut.
|
||||
#
|
||||
public function transform($text);
|
||||
|
||||
/**
|
||||
* Main function. Performs some preprocessing on the input text
|
||||
* and pass it through the document gamut.
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
public function transform($text);
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
PHP Markdown
|
||||
============
|
||||
|
||||
PHP Markdown Lib 1.5.0 - 1 Mar 2015
|
||||
PHP Markdown Lib 1.7.0 - 29 Oct 2016
|
||||
|
||||
by Michel Fortin
|
||||
<https://michelf.ca/>
|
||||
|
||||
based on Markdown by John Gruber
|
||||
<http://daringfireball.net/>
|
||||
<https://daringfireball.net/>
|
||||
|
||||
|
||||
Introduction
|
||||
@ -25,7 +25,7 @@ software tool, originally written in Perl, that converts the plain text
|
||||
markup to HTML. PHP Markdown is a port to PHP of the original Markdown
|
||||
program by John Gruber.
|
||||
|
||||
* [Full documentation of the Markdown syntax](<http://daringfireball.net/projects/markdown/>)
|
||||
* [Full documentation of the Markdown syntax](<https://daringfireball.net/projects/markdown/>)
|
||||
— Daring Fireball (John Gruber)
|
||||
* [Markdown Extra syntax additions](<https://michelf.ca/projects/php-markdown/extra/>)
|
||||
— Michel Fortin
|
||||
@ -149,7 +149,7 @@ Development and Testing
|
||||
-----------------------
|
||||
|
||||
Pull requests for fixing bugs are welcome. Proposed new features are
|
||||
going meticulously reviewed -- taking into account backward compatibility,
|
||||
going to be meticulously reviewed -- taking into account backward compatibility,
|
||||
potential side effects, and future extensibility -- before deciding on
|
||||
acceptance or rejection.
|
||||
|
||||
@ -174,6 +174,63 @@ PHP Markdown, please visit [michelf.ca/donate] or send Bitcoin to
|
||||
Version History
|
||||
---------------
|
||||
|
||||
PHP Markdown Lib 1.7.0 (29 Oct 2016)
|
||||
|
||||
* Added a `hard_wrap` configuration variable to make all newline characters
|
||||
in the text become `<br>` tags in the HTML output. By default, according
|
||||
to the standard Markdown syntax these newlines are ignored unless they a
|
||||
preceded by two spaces. Thanks to Jonathan Cohlmeyer for the implementation.
|
||||
|
||||
* Improved the parsing of list items to fix problematic cases that came to
|
||||
light with the addition of `hard_wrap`. This should have no effect on the
|
||||
output except span-level list items that ended with two spaces (and thus
|
||||
ended with a line break).
|
||||
|
||||
* Added a `code_span_content_func` configuration variable which takes a
|
||||
function that will convert the content of the code span to HTML. This can
|
||||
be useful to implement syntax highlighting. Although contrary to its
|
||||
code block equivalent, there is no syntax for specifying a language.
|
||||
Credits to styxit for the implementation.
|
||||
|
||||
* Fixed a Markdwon Extra issue where two-space-at-end-of-line hard breaks
|
||||
wouldn't work inside of HTML block elements such as `<p markdown="1">`
|
||||
where the element expects only span-level content.
|
||||
|
||||
* In the parser code, switched to PHPDoc comment format. Thanks to
|
||||
Robbie Averill for the help.
|
||||
|
||||
|
||||
PHP Markdown Lib 1.6.0 (23 Dec 2015)
|
||||
|
||||
Note: this version was incorrectly released as 1.5.1 on Dec 22, a number
|
||||
that contradicted the versioning policy.
|
||||
|
||||
* For fenced code blocks in Markdown Extra, can now set a class name for the
|
||||
code block's language before the special attribute block. Previously, this
|
||||
class name was only allowed in the absence of the special attribute block.
|
||||
|
||||
* Added a `code_block_content_func` configuration variable which takes a
|
||||
function that will convert the content of the code block to HTML. This is
|
||||
most useful for syntax highlighting. For fenced code blocks in Markdown
|
||||
Extra, the function has access to the language class name (the one outside
|
||||
of the special attribute block). Credits to Mario Konrad for providing the
|
||||
implementation.
|
||||
|
||||
* The curled arrow character for the backlink in footnotes is now followed
|
||||
by a Unicode variant selector to prevent it from being displayed in emoji
|
||||
form on iOS.
|
||||
|
||||
Note that in older browsers the variant selector is often interpreted as a
|
||||
separate character, making it visible after the arrow. So there is now a
|
||||
also a `fn_backlink_html` configuration variable that can be used to set
|
||||
the link text to something else. Credits to Dana for providing the
|
||||
implementation.
|
||||
|
||||
* Fixed an issue in MarkdownExtra where long header lines followed by a
|
||||
special attribute block would hit the backtrack limit an cause an empty
|
||||
string to be returned.
|
||||
|
||||
|
||||
PHP Markdown Lib 1.5.0 (1 Mar 2015)
|
||||
|
||||
* Added the ability start ordered lists with a number different from 1 and
|
||||
@ -289,13 +346,13 @@ Copyright and License
|
||||
---------------------
|
||||
|
||||
PHP Markdown Lib
|
||||
Copyright (c) 2004-2015 Michel Fortin
|
||||
Copyright (c) 2004-2016 Michel Fortin
|
||||
<https://michelf.ca/>
|
||||
All rights reserved.
|
||||
|
||||
Based on Markdown
|
||||
Copyright (c) 2003-2005 John Gruber
|
||||
<http://daringfireball.net/>
|
||||
<https://daringfireball.net/>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -2,7 +2,7 @@ Description of Markdown Extra import into Moodle
|
||||
|
||||
Procedure:
|
||||
* download latest version from http://michelf.ca/projects/php-markdown/
|
||||
* copy the classes and readme file to lib/markdown/*
|
||||
* copy the classes and readme file to lib/markdown/* , Note .inc files need not be copied.
|
||||
* update function markdown_to_html() in weblib.php if necessary,
|
||||
note that we require the php files manually for performance reasons
|
||||
* run phpunit tests
|
||||
|
@ -179,7 +179,7 @@
|
||||
<location>markdown</location>
|
||||
<name>Markdown original+extra</name>
|
||||
<license>BSD</license>
|
||||
<version>1.6.0</version>
|
||||
<version>1.7.0</version>
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
|
Loading…
x
Reference in New Issue
Block a user