Browse Source

Merge pull request #6590 from MrPetovan/bug/6585-diaspora-ignore-escaped-asterisks

Diaspora: Remove asterisk-meddling regular expression
tags/2019.03^2
Tobias Diekershoff GitHub 1 year ago
parent
commit
2ed66cb03b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions
  1. +1
    -1
      mod/babel.php
  2. +0
    -3
      src/Content/Text/Markdown.php

+ 1
- 1
mod/babel.php View File

@@ -98,7 +98,7 @@ function babel_content()
$html = Text\Markdown::convert($markdown);
$results[] = [
'title' => L10n::t('Markdown::convert (raw HTML)'),
'content' => htmlspecialchars($html)
'content' => visible_whitespace(htmlspecialchars($html))
];

$results[] = [


+ 0
- 3
src/Content/Text/Markdown.php View File

@@ -83,9 +83,6 @@ class Markdown extends BaseObject
{
$s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');

// Replace lonely stars in lines not starting with it with literal stars
$s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s);

// The parser cannot handle paragraphs correctly
$s = str_replace(['</p>', '<p>', '<p dir="ltr">'], ['<br>', '<br>', '<br>'], $s);



Loading…
Cancel
Save