Repository navigation
Conversation
Contributor
Author
|
Combined into #2089 with the same commits. |
jm1021
pushed a commit
that referenced
this pull request
Nov 26, 2026
…vent from opening Branch fix/calendar-slack-placeholders, head 0fa22e1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch starts from #2079's branch, which makes
slackToHtml's link regex fast. This PR changes the same function and its test file, so please merge #2079 first. Until then this PR also shows #2079's commit.Main: clicking Room change, whose description is
Room %%LK0%% today, threwCannot read properties of undefined (reading 'url'), and no window opened.This branch: the window opens and the description shows as typed.
slackToHtmlon the calendar page (_projects/systems/calendar/index.md) turns an event description's Slack-style text into HTML when you open the event. While it formats the text, it swaps code and links out for numbered placeholders (%%CB0%%for a code block,%%IC0%%for inline code,%%LK0%%for a link) and saves them in lists, then puts each one back at the end. A description can have that text in it too, and any signed-in account can write one.%%LK0%%and had no link, putting the links back looked up link 0, found nothing saved and threw an error, so the event's window never opened. Edit and Delete are only in that window, so nobody could open, edit or delete that event on the calendar page.%%CB0%%or%%IC0%%with no code saved turned into an empty code block or inline code, and that could hide real links. Inside the function,<https://a.b|x>IC1<https://c.d|y>became%%LK0%%IC1%%LK1%%. The%%IC1%%in the middle turned into empty inline code and used up the%%both link placeholders needed, leaving%%LK0<code></code>LK1%%, so neither link showed.Other notes:
Room %%LK0%% <https://a.b|map>still shows the map link twice, the same as on main: the typed%%LK0%%matches the map link's placeholder, so the map link goes in both spots. Fixing that needs a way to mark code and links that a description can't contain, which is a bigger change for a link that shows up twice.%,LK0,IC1and typed placeholders. This one never threw (Keep the ticker and the calendar page fast on titles and descriptions full of "<" #2079's threw on 67,503), and every description whose output changed hadCB,ICorLKfollowed by a number in it._projects/systems/calendar/tests/slack_text.test.mjs(tests/calendar_slack_text.test.mjsruns it) failed with that error before the change.How to try it:
fix/calendar-slack-placeholdersfromsvaka2000/Pages-JJ.node --test tests/calendar_slack_text.test.mjs.