Skip to content

Commit

Permalink
Add feed
Browse files Browse the repository at this point in the history
Fix completion & question blocks
  • Loading branch information
VitalikL committed Dec 21, 2024
1 parent 380853b commit 0112aa0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ops/helpers/blocks/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const completion = {

const id = crypto.createHash('sha256').update(`${blockId}-${matchIterator}-${correctCompletion ?? ''}`).digest('hex')

ret.text = ret.text.replace(completionMatch[0], `[](sspmCompletion://${id})`)
ret.text = ret.text.replace(completionMatch[0], `[${'⠀'.repeat(10)}](sspmCompletion://${id})`)

if (!ret.data) { ret.data = {} }

Expand Down
11 changes: 5 additions & 6 deletions ops/helpers/blocks/question.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { parseSegment } from "../blocks.js"
import { paragraph } from "./index.js"

export const question = {
extension: {
Expand All @@ -22,12 +23,10 @@ export const question = {
}
},
process: async function (block, resourcePath) {
let questionText = await parseSegment(block.text, resourcePath, block.id)
if (!questionText.length) {
questionText = [{markdown: block.text}]
}
let ret = { id: block.id, type: block.type, markdown: questionText[0].markdown ? `**${questionText[0].markdown}**` : '' }
if (questionText[0].data) { ret.data = questionText[0].data }
let questionText = await paragraph.process({ id: block.id, text: block.text}, resourcePath, 1)

let ret = { id: block.id, type: block.type, markdown: questionText.markdown ? `**${questionText.markdown}**` : '' }
if (questionText.data) { ret.data = questionText.data }
return ret
},
}
1 change: 1 addition & 0 deletions src/en/devo/feed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
- group: Other resources
view: folio
resources:
- en-devo-stewardship-offertory-readings-2025
- en-devo-the-way-back-to-altar
- en-devo-test
2 changes: 1 addition & 1 deletion src/en/pm/feed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
reverse: true
view: tile
resources:
- en-pm-making-disciples-101
- en-pm-global-tmi*
- en-pm-making-disciples-101
- group: GROW Series
reverse: true
view: folio
Expand Down

0 comments on commit 0112aa0

Please sign in to comment.