You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learning how to use Parsedown in order to use it into a PHP-based recipe program to manage recipe instructions.
I've used the example extension ("Add Inline Element") as a basis for a test to handle a markdown extension that will manage measurement unit conversions ("pounds" to "kilograms", "degrees Centigrade" to "degrees Fahrenheit", etc.). The initial test is to recognize a special markdown that indicates temperature in Fahrenheit, and expresses it as "° F".
The extension seems well-formed, properly recognizing the markdown, and (mostly) generating the expected HTML. However,
it does not properly generate the HTML for the ° entity,
Given the input "Preheat the oven to {F}350{/F} and wait 10 minutes."
I expect the output HTML to be <p>Preheat the oven to <em>350° F</em> and wait 10 minutes.</p>
However, the invocation of the extension results in <p>Preheat the oven to <em>350&deg; F</em> and wait 10 minutes.</p>
It is worth noting that, If I enter the input "Preheat the oven to 350° F and wait 10 minutes."
directly into parsedown, I get the expected HTML output; parsedown does not convert the input ampersand to an entity
Note: 2024-03-01 edits to clarify expected, actual results.
The text was updated successfully, but these errors were encountered:
Environment: Parsedown 1.7.4 in PHP 5.6.40.
Learning how to use Parsedown in order to use it into a PHP-based recipe program to manage recipe instructions.
I've used the example extension ("Add Inline Element") as a basis for a test to handle a markdown extension that will manage measurement unit conversions ("pounds" to "kilograms", "degrees Centigrade" to "degrees Fahrenheit", etc.). The initial test is to recognize a special markdown that indicates temperature in Fahrenheit, and expresses it as "° F".
The extension seems well-formed, properly recognizing the markdown, and (mostly) generating the expected HTML. However,
it does not properly generate the HTML for the ° entity,
Given the input
"Preheat the oven to {F}350{/F} and wait 10 minutes."
I expect the output HTML to be
<p>Preheat the oven to <em>350° F</em> and wait 10 minutes.</p>
However, the invocation of the extension results in
<p>Preheat the oven to <em>350&deg; F</em> and wait 10 minutes.</p>
See attached test php program
testparsedown.txt
It is worth noting that, If I enter the input
"Preheat the oven to 350° F and wait 10 minutes."
directly into parsedown, I get the expected HTML output; parsedown does not convert the input ampersand to an entity
Note: 2024-03-01 edits to clarify expected, actual results.
The text was updated successfully, but these errors were encountered: