@@ -166,8 +166,8 @@ export function normalizeDocument(document: DatabaseItem) {
166166 Reflect . deleteProperty ( document , 'title' )
167167 }
168168
169- const extractedContentHeading = document . body
170- ? contentHeading ( document . body as MinimarkTree )
169+ const extractedContentHeading = document . body
170+ ? contentHeading ( document . body as MinimarkTree )
171171 : { title : '' , description : '' }
172172 if ( extractedContentHeading . title === document . title ) {
173173 Reflect . deleteProperty ( document , 'title' )
@@ -235,19 +235,19 @@ export function generateRecordDeletion(collection: CollectionInfo, id: string) {
235235 * Extract the title and description from the body
236236 */
237237export function contentHeading ( body : MinimarkTree ) {
238- let title = "" ;
239- let description = "" ;
240- const children = body . value . filter ( ( node ) => node [ 0 ] !== "hr" ) ;
241- if ( children . length && children [ 0 ] ?. [ 0 ] === "h1" ) {
238+ let title = ''
239+ let description = ''
240+ const children = body . value . filter ( node => node [ 0 ] !== 'hr' )
241+ if ( children . length && children [ 0 ] ?. [ 0 ] === 'h1' ) {
242242 const node = children . shift ( ) !
243- title = textContent ( node ) ;
243+ title = textContent ( node )
244244 }
245- if ( children . length && children [ 0 ] ?. [ 0 ] === "p" ) {
246- const node = children . shift ( ) ! ;
247- description = textContent ( node ) ;
245+ if ( children . length && children [ 0 ] ?. [ 0 ] === 'p' ) {
246+ const node = children . shift ( ) !
247+ description = textContent ( node )
248248 }
249249 return {
250250 title,
251- description
252- } ;
253- }
251+ description,
252+ }
253+ }
0 commit comments