Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReST separator without rendering a space

This has come up in a few places, but I'll use footnotes as an example. Let's say I have some ReST text that references a footnote:

can be rendered in a single batch [#foot-diffuse]_.

This looks like this when rendered:

ugly space

There shouldn't be a space after text when referencing a footnote. This is what I want it to look like:

correct rendering

The problem is that the space between batch and [#foot-diffuse]_ is not optional. Taking it out makes the ReST not valid and the footnote doesn't get rendered at all. Is there some way to insert a separator between a word and a directive in ReST without it getting rendered as a space in the final output?

like image 883
jterrace Avatar asked Jul 27 '26 19:07

jterrace


1 Answers

I figured it out. Turns out you can escape the space. This works:

can be rendered in a single batch\ [#foot-diffuse]_.
like image 99
jterrace Avatar answered Jul 30 '26 10:07

jterrace



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!