✅ COMPLETED: 1. Dockerfile uses port 80 (astro preview) 2. BaseLayout imports globals.css 3. globals.css with Tailwind v4 @theme syntax 4. index.astro has Header, Footer, FixedContact 5. All image references fixed to existing files 6. Hero uses hdpe_pipe_main.jpg 7. Product cards use hdpe001.jpg 8. pt-20 on main for fixed header ✅ TESTED LOCALLY: - Build: 15 pages in 1.27s - Docker build successful - Port 80 working - Images load - CSS works Ready for Easypanel deployment.
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
/**
|
|
* @typedef {import('nlcst').Paragraph} Paragraph
|
|
*/
|
|
|
|
import {toString} from 'nlcst-to-string'
|
|
import {modifyChildren} from 'unist-util-modify-children'
|
|
// Initial lowercase letter.
|
|
import {lowerInitial} from '../expressions.js'
|
|
|
|
// Merge a sentence into its previous sentence, when the sentence starts with a
|
|
// lower case letter.
|
|
export const mergeInitialLowerCaseLetterSentences = modifyChildren(
|
|
/**
|
|
* @type {import('unist-util-modify-children').Modifier<Paragraph>}
|
|
*/
|
|
function (child, index, parent) {
|
|
if (child.type === 'SentenceNode' && index > 0) {
|
|
const previous = parent.children[index - 1]
|
|
const children = child.children
|
|
|
|
if (children.length > 0 && previous.type === 'SentenceNode') {
|
|
let position = -1
|
|
|
|
while (children[++position]) {
|
|
const node = children[position]
|
|
|
|
if (node.type === 'WordNode') {
|
|
if (!lowerInitial.test(toString(node))) {
|
|
return
|
|
}
|
|
|
|
previous.children.push(...children)
|
|
|
|
parent.children.splice(index, 1)
|
|
|
|
// Update position.
|
|
if (previous.position && child.position) {
|
|
previous.position.end = child.position.end
|
|
}
|
|
|
|
// Next, iterate over the node *now* at the current position.
|
|
return index
|
|
}
|
|
|
|
if (node.type === 'SymbolNode' || node.type === 'PunctuationNode') {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|