Missing space in permalink to paragraph

24 views
Skip to first unread message

valeriom...@gmail.com

unread,
Aug 18, 2026, 5:21:48 PM (7 days ago) Aug 18
to PreTeXt development
Hello devs,
as the subject explains if you copy a permalink to a paragraph (try, for instance, anyone in https://pretextbook.org/doc/guide/html/philosophy.html) you get something like this 


Note the missing space between 'paragraph' and 'https'.

However if you paste directly in gmail (or in google groups) everything seems fine  


but if you use another mail client (I tried outlook) you get the above issue


Valerio

Rob Beezer

unread,
Aug 19, 2026, 10:47:26 PM (6 days ago) Aug 19
to prete...@googlegroups.com
I can't get my assistant to reproduce this. There should be three characters
after "Paragraph" when you copy the permalink: " \r\n".

I am assuming you mean that you copy this into a #p in some PreTeXt source. We
automatically turn any #p into one long line. Testing is preserving a space
there (as I would expect).

So the only unknown I can think of is your editing environment.

Though my assistant suggests that you could be getting HTML off the clipboard,
not "raw" text. It is not able to test that.

And why do we have three characters? Why not just "\n"?

I'm at my pay grade - I hope somebody else can take over.

Rob


On 8/18/26 14:21, valeriom...@gmail.com wrote:
> Hello devs,
> as the subject explains if you copy a permalink to a paragraph (try, for
> instance, anyone in https://pretextbook.org/doc/guide/html/philosophy.html) you
> get something like this
>
> Paragraphhttps://pretextbook.org/doc/guide/html/philosophy.html#philosophy-2
>
> Note the missing space between 'paragraph' and 'https'.
>
> However if you paste directly in gmail (or in google groups) everything seems fine
>
> Paragraph <https://pretextbook.org/doc/guide/html/philosophy.html#philosophy-2>
>
> but if you use another mail client (I tried outlook) you get the above issue
>
>
> Valerio
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/4e25da5f-1426-45cc-bf16-722404cf861an%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/4e25da5f-1426-45cc-
> bf16-722404cf861an%40googlegroups.com?utm_medium=email&utm_source=footer>.

valeriom...@gmail.com

unread,
Aug 20, 2026, 3:10:39 AM (6 days ago) Aug 20
to PreTeXt development
  Hi Rob,
what I did is this. I copied a permalink of a paragraph and I pasted in the address bar of Chrome. The space is missing both in Windows and in Android. If I do the same thing with a section title, the space between the title and the URL is present. If I paste it in a email message composed with gmail (or with google groups like the present one) I get Paragraph, which is fine, so it seems that the correct interpretation of what is copied and pasted depends on the application. Anyway, I assume that the permalink is not meant to be pasted directly in the address bar (I pasted it there by accident) so I think this can be ignored.

Valerio 

Charilaos Skiadas

unread,
Aug 20, 2026, 10:49:55 AM (5 days ago) Aug 20
to prete...@googlegroups.com
I can confirm what Valerio describes. What is going on at a first level is that the clicking on the link places two entries in the clipboard: a text/html entry and a text/plain entry. So the behavior varies depending on where this is copied:

When copied in a context that understands text/html, like word processors, spreadsheets, many email clients, it becomes a link whose text is reflective of the type of content (a numbered reference if one is possible, or a word like Paragraph etc).

When instead it is copied into a context that doesn’t understand text/html, like the web browser’s location bar or a plain text editor, it is the text/plain version that is being used.

And here lies the “problem”, or in any case the choice that we have made at the moment: This plain text version consists of two lines of text, the first line being the same label that is used in the text/html link as the text  for the link, and the second line being the actual link.

in a location bar the newline separator basically goes away, hence Valerio’s behavior.

Personally I would much rather prefer it if the text/plain version was just the link and nothing else, that is what you expect to get when you “copy a link”. In almost every case where I need to do this, I have to then clean up the pasted result to remove the label.

I think it’s up to us to decide which way that should work. But this is why it behaves as Valerio describes at this point, because of what we ship as the text/plain version of the copy.

Charilaos Skiadas
Department of Mathematics
Hanover College


To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/21611d3d-2661-45d3-b6a4-14dd2391ce77n%40googlegroups.com.

Jeremy Sylvestre

unread,
Aug 20, 2026, 11:15:28 AM (5 days ago) Aug 20
to prete...@googlegroups.com
On Thu, 20 Aug 2026 at 08:49, Charilaos Skiadas <cski...@gmail.com> wrote:

When copied in a context that understands text/html, like word processors, spreadsheets, many email clients, it becomes a link whose text is reflective of the type of content (a numbered reference if one is possible, or a word like Paragraph etc).

When instead it is copied into a context that doesn’t understand text/html, like the web browser’s location bar or a plain text editor, it is the text/plain version that is being used.

This is the intended behaviour of the "click-to-copy" function of permalinks, and was purposefully designed this way.

The intended use of this function is: you are an instructor and need to point a student to the relevant material in the textbook that helps answer their question. You will be pasting this link into an email or message board or whatever, not into an address bar. To be most useful to the recipient (the student), this link should not be just a URL but should instead carry with it some information about what exactly is being linked (which is not always apparent from the link itself). This context information should be present whether you are pasting into a rich-text environment (like a web-based email client or a rich-text editor in an LMS or etc) or into a plain-text environment (like a text-based email client or an SMS text message or etc).

If you want just a bare link that  you can paste into an address bar, you can right-click the permalink icon and select "Copy link address" from the pop-up context menu.

Hope this helps!
Jeremy S
Reply all
Reply to author
Forward
0 new messages