11import './extensions'
22import { Options } from './options' ;
3- import { EmbedAttributes } from './Models/embed-attributes-model' ;
3+ import { Attributes } from './Models/embed-attributes-model' ;
44import { findEmbeddedObjects , findRenderString } from './helper/find-embeded-object' ;
55import { HTMLElement } from 'node-html-parser' ;
66
@@ -13,7 +13,7 @@ export function renderContent(content: (string | string[]), options: Options): (
1313 // render content of type string
1414 if ( typeof content === 'string' ) {
1515 let contentToReplace = content
16- content . forEachEmbeddedObject ( ( embededObjectTag : string , object : EmbedAttributes ) => {
16+ content . forEachEmbeddedObject ( ( embededObjectTag : string , object : Attributes ) => {
1717 contentToReplace = findAndReplaceEmbeddedObject (
1818 contentToReplace ,
1919 embededObjectTag ,
@@ -30,7 +30,7 @@ export function renderContent(content: (string | string[]), options: Options): (
3030 resultContent . push ( '' )
3131 } else {
3232 let contentToReplace = element
33- element . forEachEmbeddedObject ( ( embededObjectTag : string , object : EmbedAttributes ) => {
33+ element . forEachEmbeddedObject ( ( embededObjectTag : string , object : Attributes ) => {
3434 contentToReplace = findAndReplaceEmbeddedObject (
3535 contentToReplace ,
3636 embededObjectTag ,
@@ -43,7 +43,7 @@ export function renderContent(content: (string | string[]), options: Options): (
4343 return resultContent
4444}
4545
46- function findAndReplaceEmbeddedObject ( content :string , embededObjectTag : string , object : EmbedAttributes , option : Options ) : string {
46+ function findAndReplaceEmbeddedObject ( content :string , embededObjectTag : string , object : Attributes , option : Options ) : string {
4747 const embeddedObjects = findEmbeddedObjects ( object , option . entry )
4848 const renderString = findRenderString ( object , embeddedObjects [ 0 ] , option . renderOption )
4949 return content . replace ( embededObjectTag , renderString )
0 commit comments