Let me try a completely different approach then. Let's bypass Conform and use Neovim's built-in functions to run a formatter directly on the TypeScript code:
vim.api.nvim_create_user_command('FormatTSMarkdown', function()
-- Save cursor position
local cursor_pos = vim.api.nvim_win_get_cursor(0)
local bufnr = vim.api.nvim_get_current_buf()
-- Find TypeScript code blocks
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)