A hash character inside a markdown table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A hash character inside a markdown table

Brian Henning

Hi,

 

I’m trying to display a hash inside a string inside a markdown table.  Here is the source:

 

-0.5   | P#B2      | -2<sup>-1</sup>

 

This results in the following HTML for the center column:

<td>P::B2 </td>

 

If I try HTML entity such as this:

 

-0.5   | P&#35;B2      | -2<sup>-1</sup>  <!-- Markdown gobbles the # character, so use HTML entity; actual format string is P#B2 -->

 

Then the entity ends up escaped in the HTML:

<td>P&amp;#35;B2 </td>

 

I tried removing the inline HTML comment to make sure it wasn’t causing the problem, and it made no difference.

 

Why is the ampersand getting escaped?  How do I prevent it, or otherwise stop markdown from parsing the # character?

 

Thanks,

-B


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: A hash character inside a markdown table

albert
Brian,

Did you try to do the escaping by means of a backslash ?

Albert

On Tue, May 10, 2016 at 6:48 PM, Brian Henning <[hidden email]> wrote:

Hi,

 

I’m trying to display a hash inside a string inside a markdown table.  Here is the source:

 

-0.5   | P#B2      | -2<sup>-1</sup>

 

This results in the following HTML for the center column:

<td>P::B2 </td>

 

If I try HTML entity such as this:

 

-0.5   | P&#35;B2      | -2<sup>-1</sup>  <!-- Markdown gobbles the # character, so use HTML entity; actual format string is P#B2 -->

 

Then the entity ends up escaped in the HTML:

<td>P&amp;#35;B2 </td>

 

I tried removing the inline HTML comment to make sure it wasn’t causing the problem, and it made no difference.

 

Why is the ampersand getting escaped?  How do I prevent it, or otherwise stop markdown from parsing the # character?

 

Thanks,

-B


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: A hash character inside a markdown table

Brian Henning

Aha!  I don’t know why I didn’t think to try that.  That works correctly.

 

Thanks!

 

From: Albert [mailto:[hidden email]]
Sent: Tuesday, May 10, 2016 1:42 PM
To: Brian Henning <[hidden email]>
Cc: [hidden email]
Subject: Re: [Doxygen-users] A hash character inside a markdown table

 

Brian,

Did you try to do the escaping by means of a backslash ?

Albert

 

On Tue, May 10, 2016 at 6:48 PM, Brian Henning <[hidden email]> wrote:

Hi,

 

I’m trying to display a hash inside a string inside a markdown table.  Here is the source:

 

-0.5   | P#B2      | -2<sup>-1</sup>

 

This results in the following HTML for the center column:

<td>P::B2 </td>

 

If I try HTML entity such as this:

 

-0.5   | P&#35;B2      | -2<sup>-1</sup>  <!-- Markdown gobbles the # character, so use HTML entity; actual format string is P#B2 -->

 

Then the entity ends up escaped in the HTML:

<td>P&amp;#35;B2 </td>

 

I tried removing the inline HTML comment to make sure it wasn’t causing the problem, and it made no difference.

 

Why is the ampersand getting escaped?  How do I prevent it, or otherwise stop markdown from parsing the # character?

 

Thanks,

-B


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users

 


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users