3
3
IDocuNotionContext ,
4
4
IRegexMarkdownModification ,
5
5
} from "./plugins/pluginTypes" ;
6
- import { error , info , logDebug , verbose , warning } from "./log" ;
6
+ import { error , info , logDebug , logDebugFn , verbose , warning } from "./log" ;
7
7
import { NotionPage } from "./NotionPage" ;
8
8
import { IDocuNotionConfig } from "./config/configuration" ;
9
9
import { NotionBlock } from "./types" ;
@@ -27,7 +27,7 @@ export async function getMarkdownForPage(
27
27
28
28
const blocks = await context . getBlockChildren ( page . pageId ) ;
29
29
30
- logDebug ( "pull ", JSON . stringify ( blocks ) ) ;
30
+ logDebugFn ( "markdown from page ", ( ) => JSON . stringify ( blocks , null , 2 ) ) ;
31
31
32
32
const body = await getMarkdownFromNotionBlocks ( context , config , blocks ) ;
33
33
const frontmatter = getFrontMatter ( page ) ; // todo should be a plugin
@@ -217,6 +217,10 @@ function registerNotionToMarkdownCustomTransforms(
217
217
config . plugins . forEach ( plugin => {
218
218
if ( plugin . notionToMarkdownTransforms ) {
219
219
plugin . notionToMarkdownTransforms . forEach ( transform => {
220
+ logDebug (
221
+ "registering custom transform" ,
222
+ `${ plugin . name } for ${ transform . type } `
223
+ ) ;
220
224
docunotionContext . notionToMarkdown . setCustomTransformer (
221
225
transform . type ,
222
226
( block : any ) => {
0 commit comments