Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry Emulator - Edit Notice #2650

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Entry Emulator - Edit Notice #2650

merged 3 commits into from
Oct 13, 2023

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Sep 22, 2023

Many of our entries and articles have notices at the beginning saying when they were first published and last updated.

In our old articles, these sentences were lifted into the article header, but the wp migration was putting them unceremoniously into the article body.

This PR adds code which identifies these phrases and puts them in a callout.

Before

image

After

image

@ikesau ikesau requested a review from danyx23 September 22, 2023 20:22
@ikesau ikesau self-assigned this Sep 22, 2023
// Special handling for a unique span that we use to mark the first published date
if (
span.spanType === "span-simple-text" &&
span.text.trim().match(/published/)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably too generous now and I should make sure it only applies to the first span in the article, not any span that contains the word "published"

@ikesau ikesau force-pushed the entry-emulator-edit-notice branch from a5d9ddb to 9d26298 Compare October 13, 2023 19:03
@ikesau ikesau merged commit 0d4d198 into master Oct 13, 2023
13 checks passed
@ikesau ikesau deleted the entry-emulator-edit-notice branch October 13, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants