BenjaminHoegh / ParsedownExtended

ParsedownExtended is an extention for Parsedown, offering additional features and functionalities.
https://benjaminhoegh.github.io/ParsedownExtended
MIT License
37 stars 7 forks source link

Smarty substitutions seems to 'eat' random characters #61

Closed TheWiseMan closed 7 months ago

TheWiseMan commented 7 months ago

Describe the bug

When using smarty substitutions, characters that should be left untouched disappear from the output.

image image


    $Parser->setSetting('smarty', [
    'substitutions' => [
        'left-double-quote' => '"', // Double bottom quote
        'right-double-quote' => '"', // Double top quote
        "ndash"=> '–',
        "mdash" =>'—',
        "left-single-quote" => "'",
        "right-single-quote" => "'",
        "left-angle-quote" => '«',
        "right-angle-quote" => '»',
        "ellipses"=> "..."
    ],

    "enabled" => true
    ]);

Upon disbling smarty, everything works fine (expect substitutions of course).

Expected Behavior

No response

Code of Conduct

BenjaminHoegh commented 7 months ago

Can I get you to post the text from your image, it makes it a bit easier to debug

TheWiseMan commented 7 months ago

Sure, do you want the full document ? (sorry for the delay)

BenjaminHoegh commented 7 months ago

@TheWiseMan If it is not sensitive information then sure 😊

TheWiseMan commented 7 months ago

It unfortunately is, but testing with a test file containing solely the line below triggers the bug :

# Linéariser les équations d'évolution de la position $r$ de la bille et de la position angulaire $varphi$ du rail autour de $r=r_0=0.25m$ et $varphi=0$. Montrer qu'on peut les écrire sous le formalisme d'état.

image

BenjaminHoegh commented 7 months ago

Fixed in release 1.2.7