-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: update regex for more valid scripture feature references #155
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@vinnyjth I will work on this description. Discovered this issue while hooking up ScriptureFeatures on Admin. I dropped the before/after photos in the description already. Ideally, I think I would also like to make sure the padding/margin around scripture features on |
@nlewis84 Sounds good! long term, I wonder if we should expose this from the API :D |
Yeah, I think you are right on long term plan for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the helpful examples here!
@@ -21,16 +21,37 @@ function ScriptureFeature(props = {}) { | |||
}; | |||
|
|||
function parseBibleReference(reference) { | |||
const regex = /^([\w\s]+)\s(\d+):(\d+)-?(\d+)?$/; | |||
// This regex handles cases like 'Genesis 1-3' and 'Genesis 1:1-3:24' | |||
const regex = /^([\w\s]+)\s(\d+)(?::(\d+))?(?:-(\d+)(?::(\d+))?)?$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪
@@ -7,19 +7,27 @@ import { TypeStyles } from '../Typography'; | |||
const Longform = styled.div` | |||
${TypeStyles.BodyText}; | |||
max-width: 700px; | |||
margin-bottom: ${themeGet('space.xl')}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for throwing these style updates in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Issue
Some scripture features are bombing out in
web-embeds
but not in mobile/admin✏️ Solution
web-embeds
🔬 To Test
micro-service
byyarn dev
in the/micro-service
folder📸 Screenshots
After photos for mobile and web to show parity