mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Can't escape ^ character #104

Closed conradoplg closed 4 years ago

conradoplg commented 4 years ago

I've tried using \^ but it doesn't work; the backslash is added to the output.

miekg commented 4 years ago
% ./mmark -fragment -html <(echo 'We have a ^ character here')
<p>We have a ^ character here</p>
conradoplg commented 4 years ago

Sorry for not adding an example...

% ./mmark -fragment -html <(echo 'x^2*y^2')
<p>x<sup>2*y</sup>2</p>

% ./mmark -fragment -html <(echo 'x\^2*y\^2')
<p>x\<sup>2*y</sup>2</p>

I don't want the output to use <sup>, because xml2rfc render the exponent between parenthesis in text mode.

miekg commented 4 years ago

Ah. Yes that would make sense.

On Sun, 26 Jan 2020, 15:41 Conrado Gouvea, notifications@github.com wrote:

Sorry for not adding an example...

% ./mmark -fragment -html <(echo 'x^2*y^2')

x2*y2

% ./mmark -fragment -html <(echo 'x\^2*y\^2')

x\2*y2

I don't want the output to use , because xml2rfc render the exponent between parenthesis in text mode.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mmarkdown/mmark/issues/104?email_source=notifications&email_token=AACWIW5R5SOWMCQCF4KPKQLQ7WOJZA5CNFSM4KLIUEQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5VJIQ#issuecomment-578507938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWIW3ZZI3WB7SOWEQ6PHDQ7WOJZANCNFSM4KLIUEQA .

miekg commented 4 years ago

Ok. This turned out to be 1 char bugfix. I'll push that later today/this evening.

On Sun, 26 Jan 2020, 15:51 Miek Gieben, miek@miek.nl wrote:

Ah. Yes that would make sense.

On Sun, 26 Jan 2020, 15:41 Conrado Gouvea, notifications@github.com wrote:

Sorry for not adding an example...

% ./mmark -fragment -html <(echo 'x^2*y^2')

x2*y2

% ./mmark -fragment -html <(echo 'x\^2*y\^2')

x\2*y2

I don't want the output to use , because xml2rfc render the exponent between parenthesis in text mode.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mmarkdown/mmark/issues/104?email_source=notifications&email_token=AACWIW5R5SOWMCQCF4KPKQLQ7WOJZA5CNFSM4KLIUEQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5VJIQ#issuecomment-578507938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWIW3ZZI3WB7SOWEQ6PHDQ7WOJZANCNFSM4KLIUEQA .