mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f0bf911a0 | ||
|
|
2cac075c0e |
+604
@@ -0,0 +1,604 @@
|
||||
# Repository Structure Map
|
||||
|
||||
Auto-generated by `~/.claude-shared/scripts/repo-map.sh` (universal-ctags).
|
||||
Signatures only — classes, functions, methods, interfaces, enums, types, namespaces, traits.
|
||||
Regenerate after structural changes. Languages: `JavaScript,Sh`.
|
||||
|
||||
```
|
||||
scripts/download-tools.js:
|
||||
L22 method extract (PANDOC_CONFIG.linux)
|
||||
L36 method extract (PANDOC_CONFIG.win32)
|
||||
L51 method extract (PANDOC_CONFIG.darwin)
|
||||
L63 function download
|
||||
L70 function get (download)
|
||||
L109 function downloadPandoc
|
||||
|
||||
scripts/generate-icons.js:
|
||||
L17 function generateIcons
|
||||
|
||||
src/adapters/electron/fs.js:
|
||||
L20 method readFile (electronFsAdapter)
|
||||
L30 method writeFile (electronFsAdapter)
|
||||
L39 method deleteFile (electronFsAdapter)
|
||||
L48 method ensureDir (electronFsAdapter)
|
||||
L57 method listDirectory (electronFsAdapter)
|
||||
L77 method exists (electronFsAdapter)
|
||||
L86 method isDirectory (electronFsAdapter)
|
||||
L96 method copy (electronFsAdapter)
|
||||
L106 method move (electronFsAdapter)
|
||||
|
||||
src/analytics/analytics-panel.js:
|
||||
L7 function showAnalyticsModal
|
||||
L105 function escHandler (showAnalyticsModal)
|
||||
L116 function escapeHtml
|
||||
|
||||
src/analytics/writing-analytics.js:
|
||||
L77 function countSyllables
|
||||
L83 function extractWords
|
||||
L87 function getReadabilityLabel
|
||||
L95 function analyze
|
||||
|
||||
src/command-palette.js:
|
||||
L1 class CommandPalette
|
||||
L2 method constructor (CommandPalette)
|
||||
L12 method register (CommandPalette)
|
||||
L16 method open (CommandPalette)
|
||||
L24 method close (CommandPalette)
|
||||
L28 method isOpen (CommandPalette)
|
||||
L32 method setupEventListeners (CommandPalette)
|
||||
L61 method renderResults (CommandPalette)
|
||||
L90 method highlightMatch (CommandPalette)
|
||||
L96 method updateSelection (CommandPalette)
|
||||
L105 method executeSelected (CommandPalette)
|
||||
|
||||
src/editor/codemirror-setup.js:
|
||||
L46 function createEditor
|
||||
L61 function onChange (createEditor)
|
||||
L118 function getLanguageExtension
|
||||
L120 method javascript (getLanguageExtension.loaders)
|
||||
L124 method html (getLanguageExtension.loaders)
|
||||
L128 method css (getLanguageExtension.loaders)
|
||||
L132 method json (getLanguageExtension.loaders)
|
||||
L136 method python (getLanguageExtension.loaders)
|
||||
|
||||
src/main.js:
|
||||
L18 function getPandocPath
|
||||
L36 function getFFmpegPath
|
||||
L55 function sanitizeErrorMessage
|
||||
L64 function createRateLimiter
|
||||
L66 function canProceed (createRateLimiter)
|
||||
L83 function validatePath
|
||||
L136 function resolveWritablePath
|
||||
L181 function isPathAccessible
|
||||
L203 function convertDataToMarkdown
|
||||
L225 function runPandocCmd
|
||||
L247 function parseCommand
|
||||
L282 method get (store)
|
||||
L291 method set (store)
|
||||
L488 function checkPandocAvailability
|
||||
L500 function createWindow
|
||||
L586 function buildRecentFilesMenu
|
||||
L599 method click (buildRecentFilesMenu.anonymousObjectc5643c890c05)
|
||||
L637 function getRecentFiles
|
||||
L647 function createMenu
|
||||
L872 method click (createMenu.anonymousObjectc5643c890e05.anonymousObjectc5643c894505)
|
||||
L1118 method click (createMenu.anonymousObjectc5643c895205.anonymousObjectc5643c897e05)
|
||||
L1279 method click (createMenu.anonymousObjectc5643c899305.anonymousObjectc5643c89a505)
|
||||
L1351 function showAboutDialog
|
||||
L1452 function showDependenciesDialog
|
||||
L1564 function openPDFFile
|
||||
L1583 function openFile
|
||||
L1622 function openPdfFile
|
||||
L1645 function saveAsFile
|
||||
L1664 function exportFile
|
||||
L1673 function showExportOptionsDialog
|
||||
L1676 function showBatchConversionDialog
|
||||
L1681 function selectWordTemplate
|
||||
L1705 function showTemplateSettings
|
||||
L1902 function processDynamicFields
|
||||
L1921 function setDocxPageSize
|
||||
L1980 function addHeaderFooterToDocx
|
||||
L2111 function exportWordWithTemplate
|
||||
L2153 function exportPDFViaWordTemplate
|
||||
L2231 function showUniversalConverterDialog
|
||||
L2236 function showPDFEditorDialog
|
||||
L2246 function checkConverterAvailable
|
||||
L2370 function collectFiles
|
||||
L2464 function convertWithLibreOffice
|
||||
L2498 function convertWithImageMagick
|
||||
L2507 function convertWithFFmpeg
|
||||
L2515 function convertWithPandoc
|
||||
L2521 function performExportWithOptions
|
||||
L2805 function tryPdfFallback
|
||||
L2882 function showExportSuccess
|
||||
L2892 function exportWithPandoc
|
||||
L2964 function exportToHTML
|
||||
L3080 function exportToPDFElectron
|
||||
L3224 function exportSpreadsheet
|
||||
L3233 function importDocument
|
||||
L3355 function setTheme
|
||||
L3536 function extractTablesFromMarkdown
|
||||
L3574 function performBatchConversion
|
||||
L3597 function findMarkdownFiles (performBatchConversion)
|
||||
L3636 function processNextFile (performBatchConversion)
|
||||
L3970 function handleCLIConversion
|
||||
L3997 function showConversionDialog
|
||||
L4064 function performCLIConversion
|
||||
L4098 function buildPandocCommand
|
||||
L4319 function openFileFromPath
|
||||
L4394 function openAsciiGenerator
|
||||
L4426 function openTableGenerator
|
||||
L4724 function loadSnippets
|
||||
L4734 function saveSnippetsFile
|
||||
|
||||
src/main/GitOperations.js:
|
||||
L3 function getGitInstance
|
||||
L7 function getStatus
|
||||
L16 function stage
|
||||
L26 function commit
|
||||
L35 function log
|
||||
|
||||
src/main/PDFOperations.js:
|
||||
L5 function parsePageRanges
|
||||
L28 function hexToRgb
|
||||
L39 function pdfMerge
|
||||
L59 function pdfSplit
|
||||
L126 function pdfCompress
|
||||
L152 function pdfRotate
|
||||
L182 function pdfDeletePages
|
||||
L208 function pdfReorder
|
||||
L233 function pdfWatermark
|
||||
L319 function pdfEncrypt
|
||||
L353 function pdfDecrypt
|
||||
L370 function pdfSetPermissions
|
||||
L404 function executeOperation
|
||||
L431 function getPageCount
|
||||
|
||||
src/plugins/built-in/_sample/index.js:
|
||||
L3 class SamplePlugin
|
||||
L4 method init (SamplePlugin)
|
||||
|
||||
src/plugins/built-in/writing-studio/goal-tracker.js:
|
||||
L3 class GoalTracker
|
||||
L7 method constructor (GoalTracker)
|
||||
L11 method _getHistory (GoalTracker)
|
||||
L16 method _setHistory (GoalTracker)
|
||||
L20 method _setHistoryDay (GoalTracker)
|
||||
L26 method addWords (GoalTracker)
|
||||
L37 method getDailyProgress (GoalTracker)
|
||||
L44 method getStreak (GoalTracker)
|
||||
L61 method getLast30Days (GoalTracker)
|
||||
L74 method getWeeklyTotal (GoalTracker)
|
||||
|
||||
src/plugins/built-in/writing-studio/index.js:
|
||||
L7 class WritingStudioPlugin
|
||||
L8 method init (WritingStudioPlugin)
|
||||
L34 method _registerCommands (WritingStudioPlugin)
|
||||
L112 method _registerStatusBar (WritingStudioPlugin)
|
||||
L123 method deactivate (WritingStudioPlugin)
|
||||
L127 method getEngines (WritingStudioPlugin)
|
||||
|
||||
src/plugins/built-in/writing-studio/panels/goals-panel.js:
|
||||
L1 function renderGoalsPanel
|
||||
|
||||
src/plugins/built-in/writing-studio/panels/manuscript-panel.js:
|
||||
L1 function renderManuscriptPanel
|
||||
|
||||
src/plugins/built-in/writing-studio/panels/proofread-panel.js:
|
||||
L1 function renderProofreadPanel
|
||||
L41 method callback (anonymousObject39a0f0110105)
|
||||
L50 function renderIssues
|
||||
|
||||
src/plugins/built-in/writing-studio/panels/snapshots-panel.js:
|
||||
L1 function renderSnapshotsPanel
|
||||
|
||||
src/plugins/built-in/writing-studio/project-manager.js:
|
||||
L1 class ProjectManager
|
||||
L5 method constructor (ProjectManager)
|
||||
L9 method createProject (ProjectManager)
|
||||
L21 method loadProject (ProjectManager)
|
||||
L27 method _saveProject (ProjectManager)
|
||||
L31 method addChapter (ProjectManager)
|
||||
L38 method updateChapter (ProjectManager)
|
||||
L45 method compileManuscript (ProjectManager)
|
||||
L56 method getStats (ProjectManager)
|
||||
|
||||
src/plugins/built-in/writing-studio/snapshot-manager.js:
|
||||
L1 class SnapshotManager
|
||||
L6 method constructor (SnapshotManager)
|
||||
L11 method _getAll (SnapshotManager)
|
||||
L16 method _saveAll (SnapshotManager)
|
||||
L20 method create (SnapshotManager)
|
||||
L34 method list (SnapshotManager)
|
||||
L38 method getById (SnapshotManager)
|
||||
L42 method restore (SnapshotManager)
|
||||
L48 method delete (SnapshotManager)
|
||||
L53 method diff (SnapshotManager)
|
||||
L71 method prune (SnapshotManager)
|
||||
|
||||
src/plugins/built-in/writing-studio/sprint-engine.js:
|
||||
L1 class SprintEngine
|
||||
L6 method constructor (SprintEngine)
|
||||
L14 method start (SprintEngine)
|
||||
L22 method stop (SprintEngine)
|
||||
L33 method tick (SprintEngine)
|
||||
L43 method isActive (SprintEngine)
|
||||
L47 method getRemaining (SprintEngine)
|
||||
|
||||
src/plugins/event-bus.js:
|
||||
L1 class EventBus
|
||||
L2 method constructor (EventBus)
|
||||
L6 method on (EventBus)
|
||||
L13 method off (EventBus)
|
||||
L25 method emit (EventBus)
|
||||
L37 method hasHandler (EventBus)
|
||||
|
||||
src/plugins/plugin-api.js:
|
||||
L1 class PluginAPI
|
||||
L7 method init (PluginAPI)
|
||||
L12 method activate (PluginAPI)
|
||||
L15 method deactivate (PluginAPI)
|
||||
L18 method getManifest (PluginAPI)
|
||||
|
||||
src/plugins/plugin-context.js:
|
||||
L1 class PluginContext
|
||||
L14 method constructor (PluginContext)
|
||||
L23 method register (PluginContext.constructor.commands)
|
||||
L24 function safeHandler (PluginContext.constructor.commands.register)
|
||||
L65 method registerPreHook (PluginContext.constructor.exports)
|
||||
L68 method registerPostHook (PluginContext.constructor.exports)
|
||||
|
||||
src/plugins/plugin-loader.js:
|
||||
L4 class PluginLoader
|
||||
L8 method constructor (PluginLoader)
|
||||
L17 method discoverPlugins (PluginLoader)
|
||||
L66 method validateManifest (PluginLoader)
|
||||
|
||||
src/plugins/plugin-registry.js:
|
||||
L4 class PluginRegistry
|
||||
L5 method constructor (PluginRegistry)
|
||||
L15 method register (PluginRegistry)
|
||||
L49 method getPlugin (PluginRegistry)
|
||||
L53 method getAll (PluginRegistry)
|
||||
L57 method activate (PluginRegistry)
|
||||
L68 method deactivate (PluginRegistry)
|
||||
|
||||
src/plugins/settings-store.js:
|
||||
L1 class SettingsStore
|
||||
L5 method constructor (SettingsStore)
|
||||
L9 method get (SettingsStore)
|
||||
L13 method set (SettingsStore)
|
||||
L17 method onChanged (SettingsStore)
|
||||
|
||||
src/preload.js:
|
||||
L257 method send (anonymousObjectb0724fcb0105)
|
||||
L271 method invoke (anonymousObjectb0724fcb0105)
|
||||
L290 method on (anonymousObjectb0724fcb0105)
|
||||
L292 function subscription (anonymousObjectb0724fcb0105.on)
|
||||
L310 method once (anonymousObjectb0724fcb0105)
|
||||
L322 method removeAllListeners (anonymousObjectb0724fcb0105)
|
||||
|
||||
src/print-preview.js:
|
||||
L1 class PrintPreview
|
||||
L2 method constructor (PrintPreview)
|
||||
L9 method open (PrintPreview)
|
||||
L20 method close (PrintPreview)
|
||||
L28 method setupEventListeners (PrintPreview)
|
||||
L53 method updateScaleLabel (PrintPreview)
|
||||
L59 method updatePreview (PrintPreview)
|
||||
L111 method refreshPreview (PrintPreview)
|
||||
L117 method getOptions (PrintPreview)
|
||||
L130 method executePrint (PrintPreview)
|
||||
|
||||
src/renderer.js:
|
||||
L19 method send (window.electronAPI)
|
||||
L22 method invoke (window.electronAPI)
|
||||
L25 method on (window.electronAPI)
|
||||
L26 function subscription (window.electronAPI.on)
|
||||
L32 method once (window.electronAPI)
|
||||
L35 method removeAllListeners (window.electronAPI)
|
||||
L81 function getSidebarManager
|
||||
L85 function getRenderTemplatesPanel
|
||||
L90 function getRenderExplorerPanel
|
||||
L95 function getRenderGitPanel
|
||||
L99 function getRenderSnippetsPanel
|
||||
L105 function getRenderOutlinePanel
|
||||
L110 function getReplPanel
|
||||
L114 function getCommandPalette
|
||||
L118 function getPrintPreview
|
||||
L122 function getCreateWelcomeContent
|
||||
L127 function getZenMode
|
||||
L132 function getShowAnalyticsModal
|
||||
L137 function ensureToastContainer
|
||||
L147 function notifyUser
|
||||
L159 function dismiss (notifyUser)
|
||||
L173 method highlight (anonymousObject71555c7b0405)
|
||||
L202 method start (anonymousObject71555c7b0705.anonymousObject71555c7b0805)
|
||||
L205 method tokenizer (anonymousObject71555c7b0705.anonymousObject71555c7b0805)
|
||||
L221 method renderer (anonymousObject71555c7b0705.anonymousObject71555c7b0805)
|
||||
L241 function plantumlEncode (notifyUser)
|
||||
L249 function scopeCSS (notifyUser)
|
||||
L271 class TabManager (notifyUser)
|
||||
L272 method constructor (notifyUser.TabManager)
|
||||
L306 method setupEventListeners (notifyUser.TabManager)
|
||||
L354 method createNewTab (notifyUser.TabManager)
|
||||
L379 method createPdfTab (notifyUser.TabManager)
|
||||
L405 method createPdfTabElements (notifyUser.TabManager)
|
||||
L436 method setupPdfTabEvents (notifyUser.TabManager)
|
||||
L503 method loadPdfInTab (notifyUser.TabManager)
|
||||
L528 method renderPdfPageInTab (notifyUser.TabManager)
|
||||
L555 method createTabElements (notifyUser.TabManager)
|
||||
L580 method onChange (anonymousObject71555c7b0d05)
|
||||
L602 method onUpdate (anonymousObject71555c7b0d05)
|
||||
L614 method switchToTab (notifyUser.TabManager)
|
||||
L641 method switchToNextTab (notifyUser.TabManager)
|
||||
L647 method closeTab (notifyUser.TabManager)
|
||||
L692 method updateTabBar (notifyUser.TabManager)
|
||||
L718 method updateUI (notifyUser.TabManager)
|
||||
L748 method saveCurrentTabState (notifyUser.TabManager)
|
||||
L756 method restoreTabState (notifyUser.TabManager)
|
||||
L765 method focusActiveEditor (notifyUser.TabManager)
|
||||
L771 method updatePreview (notifyUser.TabManager)
|
||||
L800 method _hash (notifyUser.TabManager)
|
||||
L809 method _renderPreview (notifyUser.TabManager)
|
||||
L963 function onerror (img)
|
||||
L997 method updatePreviewVisibility (notifyUser.TabManager)
|
||||
L1010 method updateLineNumbers (notifyUser.TabManager)
|
||||
L1015 method updateWordCount (notifyUser.TabManager)
|
||||
L1031 method updateCursorPosition (notifyUser.TabManager)
|
||||
L1038 method updateFilePath (notifyUser.TabManager)
|
||||
L1046 method updateBreadcrumb (notifyUser.TabManager)
|
||||
L1054 method setupEditorEvents (notifyUser.TabManager)
|
||||
L1058 method handleEditorInput (notifyUser.TabManager)
|
||||
L1073 method startAutoSave (notifyUser.TabManager)
|
||||
L1081 method stopAutoSave (notifyUser.TabManager)
|
||||
L1087 method performAutoSave (notifyUser.TabManager)
|
||||
L1103 method showAutoSaveIndicator (notifyUser.TabManager)
|
||||
L1119 method addToRecentFiles (notifyUser.TabManager)
|
||||
L1135 method getRecentFiles (notifyUser.TabManager)
|
||||
L1145 method setupToolbarEvents (notifyUser.TabManager)
|
||||
L1215 method wrapSelection (notifyUser.TabManager)
|
||||
L1233 method insertAtLineStart (notifyUser.TabManager)
|
||||
L1249 method insertTable (notifyUser.TabManager)
|
||||
L1259 method insertCodeBlock (notifyUser.TabManager)
|
||||
L1277 method insertHorizontalRule (notifyUser.TabManager)
|
||||
L1280 method setupFindEvents (notifyUser.TabManager)
|
||||
L1350 method performFind (notifyUser.TabManager)
|
||||
L1384 method findNext (notifyUser.TabManager)
|
||||
L1390 method findPrevious (notifyUser.TabManager)
|
||||
L1399 method highlightMatch (notifyUser.TabManager)
|
||||
L1430 method replaceOne (notifyUser.TabManager)
|
||||
L1454 method replaceAll (notifyUser.TabManager)
|
||||
L1485 method clearFindHighlights (notifyUser.TabManager)
|
||||
L1492 method checkForLargeFile (notifyUser.TabManager)
|
||||
L1508 method openFile (notifyUser.TabManager)
|
||||
L1555 method getEditorContent (notifyUser.TabManager)
|
||||
L1564 method setEditorContent (notifyUser.TabManager)
|
||||
L1579 method insertAtCursor (notifyUser.TabManager)
|
||||
L1594 method getSelection (notifyUser.TabManager)
|
||||
L1602 method replaceSelection (notifyUser.TabManager)
|
||||
L1616 method getCurrentContent (notifyUser.TabManager)
|
||||
L1620 method getCurrentFilePath (notifyUser.TabManager)
|
||||
L1735 method render (anonymousObject71555c7b2d05)
|
||||
L1788 method registerIndicator (anonymousObject71555c7b3105.statusBar)
|
||||
L1881 function onload (reader)
|
||||
L2032 method onChange (anonymousObject71555c7b3405)
|
||||
L2040 method onUpdate (anonymousObject71555c7b3405)
|
||||
L2164 function applyCustomPreviewCSS (notifyUser)
|
||||
L2174 function triggerLoadCustomCSS (notifyUser)
|
||||
L2188 function triggerClearCustomCSS (notifyUser)
|
||||
L2202 function updateFontSizes (notifyUser)
|
||||
L2234 function openPrintPreviewDialog (notifyUser)
|
||||
L2255 function showExportDialog (notifyUser)
|
||||
L2269 function hideExportDialog (notifyUser)
|
||||
L2273 function initializeExportForm (notifyUser)
|
||||
L2343 function collectExportOptions (notifyUser)
|
||||
L2444 function loadExportProfiles (notifyUser)
|
||||
L2456 function saveExportProfiles (notifyUser)
|
||||
L2459 function populateProfileDropdown (notifyUser)
|
||||
L2476 function saveCurrentProfile (notifyUser)
|
||||
L2511 function loadProfile (notifyUser)
|
||||
L2545 function deleteSelectedProfile (notifyUser)
|
||||
L2679 function onchange (input)
|
||||
L2776 function showBatchDialog (notifyUser)
|
||||
L2796 function hideBatchDialog (notifyUser)
|
||||
L2799 function updateBatchProgress (notifyUser)
|
||||
L2816 function validateBatchForm (notifyUser)
|
||||
L3375 function showUniversalConverterDialog (notifyUser)
|
||||
L3383 function updateConverterFormats (notifyUser)
|
||||
L3423 function updateConverterAdvancedOptions (notifyUser)
|
||||
L3434 function collectConverterAdvancedOptions (notifyUser)
|
||||
L3645 function showPDFEditorDialog (notifyUser)
|
||||
L3769 function hidePDFEditorDialog (notifyUser)
|
||||
L3780 function updateMergeFilesList (notifyUser)
|
||||
L4107 function getPDFStatusElement (notifyUser)
|
||||
L4110 function showPDFStatus (notifyUser)
|
||||
L4117 function clearPDFStatus (notifyUser)
|
||||
L4124 function showPDFValidationMessage (notifyUser)
|
||||
L4135 function processPDFOperation (notifyUser)
|
||||
L4379 function initMathSupport (notifyUser)
|
||||
L4391 function onload (katexJS)
|
||||
L4396 function onload (autoRenderJS)
|
||||
L4417 function openHeaderFooterDialog (notifyUser)
|
||||
L4425 function closeHeaderFooterDialog (notifyUser)
|
||||
L4430 function openFieldPickerDialog (notifyUser)
|
||||
L4436 function closeFieldPickerDialog (notifyUser)
|
||||
L4477 function toggleConfigContent (notifyUser)
|
||||
L4488 function saveHeaderFooterSettings (notifyUser)
|
||||
L4509 function browseForLogo (notifyUser)
|
||||
L4519 function clearLogo (notifyUser)
|
||||
L4528 function insertDynamicField (notifyUser)
|
||||
L4594 function showTableGenerator (notifyUser)
|
||||
L4605 function hideTableGenerator (notifyUser)
|
||||
L4608 function generateTablePreview (notifyUser)
|
||||
L4616 function generateMarkdownTable (notifyUser)
|
||||
L4685 function insertGeneratedTable (notifyUser)
|
||||
L4742 function showASCIIGenerator (notifyUser)
|
||||
L4753 function hideASCIIGenerator (notifyUser)
|
||||
L4756 function switchASCIIMode (notifyUser)
|
||||
L4784 function generateASCIIPreview (notifyUser)
|
||||
L4802 function textToASCII (notifyUser)
|
||||
L5238 function createASCIIBox (notifyUser)
|
||||
L5312 function getASCIITemplate (notifyUser)
|
||||
L5469 function loadASCIITemplate (notifyUser)
|
||||
L5473 function insertASCIIArt (notifyUser)
|
||||
L5523 function anonymousFunction71555c7bd300
|
||||
L5603 function getPdfjsLib (notifyUser)
|
||||
L5612 function openPdfFile (notifyUser)
|
||||
L5627 function renderPdfPage (notifyUser)
|
||||
L5733 function closePdfViewer (notifyUser)
|
||||
L5783 function openPdfEditorDialog (notifyUser)
|
||||
L5831 function initPaneResizer (notifyUser)
|
||||
L5920 function onPDFFileSelected (notifyUser)
|
||||
L5935 function loadPDFThumbnails (notifyUser)
|
||||
L5966 function renderThumbnailGrid (notifyUser)
|
||||
L6060 function renderThumbnail (notifyUser)
|
||||
L6085 function syncRotateInput (notifyUser)
|
||||
L6094 function syncDeleteInput (notifyUser)
|
||||
L6103 function syncReorderInput (notifyUser)
|
||||
|
||||
src/repl/repl-panel.js:
|
||||
L1 class ReplPanel
|
||||
L2 method constructor (ReplPanel)
|
||||
L8 method setupEventListeners (ReplPanel)
|
||||
L13 method toggle (ReplPanel)
|
||||
L19 method show (ReplPanel)
|
||||
L25 method clear (ReplPanel)
|
||||
L29 method appendOutput (ReplPanel)
|
||||
L42 method escapeHtml (ReplPanel)
|
||||
|
||||
src/sidebar/explorer-panel.js:
|
||||
L1 function renderExplorerPanel
|
||||
L40 function renderTree
|
||||
L79 function getFileIcon
|
||||
|
||||
src/sidebar/git-panel.js:
|
||||
L1 function renderGitPanel
|
||||
L24 function loadGitStatus (renderGitPanel)
|
||||
|
||||
src/sidebar/outline-panel.js:
|
||||
L6 function renderOutlinePanel
|
||||
L18 function parseHeadings (renderOutlinePanel)
|
||||
L36 function findActiveHeading (renderOutlinePanel)
|
||||
L48 function renderHeadings (renderOutlinePanel)
|
||||
L89 function escapeHtml (renderOutlinePanel)
|
||||
L95 function refresh (renderOutlinePanel)
|
||||
L100 function setActiveHeading (renderOutlinePanel)
|
||||
|
||||
src/sidebar/sidebar-manager.js:
|
||||
L1 class SidebarManager
|
||||
L2 method constructor (SidebarManager)
|
||||
L11 method setupEventListeners (SidebarManager)
|
||||
L20 method registerPanel (SidebarManager)
|
||||
L24 method togglePanel (SidebarManager)
|
||||
L32 method expand (SidebarManager)
|
||||
L45 method collapse (SidebarManager)
|
||||
|
||||
src/sidebar/snippets-panel.js:
|
||||
L1 function renderSnippetsPanel
|
||||
L14 function loadSnippets (renderSnippetsPanel)
|
||||
L19 function renderList (renderSnippetsPanel)
|
||||
|
||||
src/sidebar/templates-panel.js:
|
||||
L18 function renderTemplatesPanel
|
||||
|
||||
src/utils/ModalManager.js:
|
||||
L5 class ModalManager
|
||||
L16 method constructor (ModalManager)
|
||||
L31 method init (ModalManager)
|
||||
L47 method setupCloseTriggers (ModalManager)
|
||||
L51 function handler (ModalManager.setupCloseTriggers)
|
||||
L65 function handler
|
||||
L74 method getFocusableElements (ModalManager)
|
||||
L89 method trapFocus (ModalManager)
|
||||
L111 method handleKeydown (ModalManager)
|
||||
L119 method open (ModalManager)
|
||||
L141 function keydownHandler (ModalManager.open)
|
||||
L164 method close (ModalManager)
|
||||
L182 function addHidden (ModalManager.close)
|
||||
L188 function onTransitionEnd (ModalManager.close)
|
||||
L223 method isOpen (ModalManager)
|
||||
L227 method destroy (ModalManager)
|
||||
|
||||
src/welcome.js:
|
||||
L1 function createWelcomeContent
|
||||
|
||||
src/wordTemplateExporter.js:
|
||||
L11 class WordTemplateExporter
|
||||
L12 method constructor (WordTemplateExporter)
|
||||
L24 method preprocessMarkdownForWordExport (WordTemplateExporter)
|
||||
L33 function flush (WordTemplateExporter.preprocessMarkdownForWordExport)
|
||||
L59 function stripArtifacts (WordTemplateExporter.preprocessMarkdownForWordExport)
|
||||
|
||||
src/zen-mode.js:
|
||||
L10 class ZenMode
|
||||
L14 method constructor (ZenMode)
|
||||
L23 method activate (ZenMode)
|
||||
L65 method deactivate (ZenMode)
|
||||
L101 method toggle (ZenMode)
|
||||
L109 method _applyTypewriterBehavior (ZenMode)
|
||||
L111 function scrollFn (ZenMode._applyTypewriterBehavior)
|
||||
L151 method _createHUD (ZenMode)
|
||||
L169 method _updateHUD (ZenMode)
|
||||
L220 method constructor (anonymousObject3acf7ce30205)
|
||||
L240 function getOpacity
|
||||
L250 method constructor (anonymousObject3acf7ce30405)
|
||||
|
||||
tests/git-operations.test.js:
|
||||
L26 function asyncFn
|
||||
L35 function asyncFnWithError
|
||||
|
||||
tests/main-utils.test.js:
|
||||
L7 function sanitizeErrorMessage
|
||||
L49 function createRateLimiter
|
||||
L51 function canProceed (createRateLimiter)
|
||||
|
||||
tests/markdown-extensions.test.js:
|
||||
L83 method start (extension)
|
||||
L86 method tokenizer (extension)
|
||||
L102 method renderer (extension)
|
||||
L151 function plantumlEncode
|
||||
L176 function slugify
|
||||
L203 function scopeCSS
|
||||
|
||||
tests/modal-manager.test.js:
|
||||
L11 function createModalElement
|
||||
|
||||
tests/plugin-api.test.js:
|
||||
L18 class MyPlugin
|
||||
L19 method init (MyPlugin)
|
||||
|
||||
tests/plugin-context.test.js:
|
||||
L39 function badHandler
|
||||
|
||||
tests/plugin-loader.test.js:
|
||||
L17 function writeManifest
|
||||
|
||||
tests/plugin-registry.test.js:
|
||||
L5 class TestPlugin
|
||||
L6 method init (TestPlugin)
|
||||
L10 method activate (TestPlugin)
|
||||
L13 method deactivate (TestPlugin)
|
||||
L69 class BadPlugin
|
||||
L70 method init (BadPlugin)
|
||||
|
||||
tests/setup.js:
|
||||
L96 function error (console)
|
||||
|
||||
tests/sidebar.test.js:
|
||||
L41 method render (anonymousObjectfe2d35d70105)
|
||||
L52 method render (anonymousObjectfe2d35d70205)
|
||||
L62 method render (anonymousObjectfe2d35d70305)
|
||||
L68 method render (anonymousObjectfe2d35d70405)
|
||||
L80 method render (anonymousObjectfe2d35d70505)
|
||||
L88 method render (anonymousObjectfe2d35d70605)
|
||||
L96 method render (anonymousObjectfe2d35d70705)
|
||||
L120 method render (anonymousObjectfe2d35d70905)
|
||||
L130 method render (anonymousObjectfe2d35d70a05)
|
||||
|
||||
tests/utils.test.js:
|
||||
L9 function parseCommand
|
||||
L78 function hexToRgb
|
||||
L121 function getExtension
|
||||
L133 function replaceExtension
|
||||
```
|
||||
+38
-11
@@ -2563,17 +2563,16 @@ function performExportWithOptions(format, options) {
|
||||
// Use pandoc for export with advanced options
|
||||
|
||||
let inputFile = currentFile;
|
||||
let tempInputDir = null;
|
||||
let tempInputFile = null;
|
||||
|
||||
// Pre-process markdown for Word output so that <style> blocks, HTML
|
||||
// comments, and alignment <div> tags do not appear as visible text.
|
||||
// comments, and <div> tags do not appear as visible text.
|
||||
if (format === 'docx') {
|
||||
const content = fs.readFileSync(currentFile, 'utf-8');
|
||||
const cleanedContent = WordTemplateExporter.preprocessMarkdownForWordExport(content);
|
||||
tempInputFile = path.join(
|
||||
require('os').tmpdir(),
|
||||
`mc_export_${Date.now()}_${path.basename(currentFile)}`
|
||||
);
|
||||
tempInputDir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'mc_export_'));
|
||||
tempInputFile = path.join(tempInputDir, path.basename(currentFile));
|
||||
fs.writeFileSync(tempInputFile, cleanedContent, 'utf-8');
|
||||
inputFile = tempInputFile;
|
||||
}
|
||||
@@ -2681,6 +2680,13 @@ function performExportWithOptions(format, options) {
|
||||
// Ignore cleanup errors
|
||||
}
|
||||
}
|
||||
if (tempInputDir) {
|
||||
try {
|
||||
fs.rmdirSync(tempInputDir);
|
||||
} catch {
|
||||
// Ignore cleanup errors
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (format === 'pptx') {
|
||||
// Add PowerPoint footer if enabled
|
||||
@@ -3777,19 +3783,33 @@ async function performBatchConversion(inputFolder, outputFolder, format, options
|
||||
|
||||
// Build pandoc command for other formats
|
||||
let pandocInputFile = inputFile;
|
||||
let batchTempInputDir = null;
|
||||
let batchTempInputFile = null;
|
||||
|
||||
// Pre-process markdown for Word output so that <style> blocks, HTML
|
||||
// comments, and alignment <div> tags do not appear as visible text.
|
||||
// comments, and <div> tags do not appear as visible text.
|
||||
if (format === 'docx') {
|
||||
try {
|
||||
const content = fs.readFileSync(inputFile, 'utf-8');
|
||||
const cleanedContent = WordTemplateExporter.preprocessMarkdownForWordExport(content);
|
||||
batchTempInputFile = path.join(
|
||||
require('os').tmpdir(),
|
||||
`mc_batch_export_${Date.now()}_${path.basename(inputFile)}`
|
||||
);
|
||||
batchTempInputDir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'mc_batch_export_'));
|
||||
batchTempInputFile = path.join(batchTempInputDir, path.basename(inputFile));
|
||||
fs.writeFileSync(batchTempInputFile, cleanedContent, 'utf-8');
|
||||
pandocInputFile = batchTempInputFile;
|
||||
} catch (preprocessError) {
|
||||
console.error(
|
||||
`Batch: Failed to pre-process ${path.basename(inputFile)}:`,
|
||||
preprocessError.message
|
||||
);
|
||||
mainWindow.webContents.send('batch-progress', {
|
||||
completed: index + 1,
|
||||
total: totalCount,
|
||||
currentFile: path.basename(inputFile),
|
||||
success: false,
|
||||
});
|
||||
processNextFile(index + 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let pandocCmd = `${getPandocPath()} "${pandocInputFile}" -o "${outputFile}"`;
|
||||
@@ -3893,7 +3913,7 @@ async function performBatchConversion(inputFolder, outputFolder, format, options
|
||||
|
||||
// Execute conversion (using runPandocCmd for safety)
|
||||
runPandocCmd(pandocCmd, async (error, _stdout, stderr) => {
|
||||
// Clean up temporary pre-processed input file
|
||||
// Clean up temporary pre-processed input file and directory
|
||||
if (batchTempInputFile) {
|
||||
try {
|
||||
fs.unlinkSync(batchTempInputFile);
|
||||
@@ -3901,6 +3921,13 @@ async function performBatchConversion(inputFolder, outputFolder, format, options
|
||||
// Ignore cleanup errors
|
||||
}
|
||||
}
|
||||
if (batchTempInputDir) {
|
||||
try {
|
||||
fs.rmdirSync(batchTempInputDir);
|
||||
} catch {
|
||||
// Ignore cleanup errors
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
console.error(`Batch: Failed to convert ${path.basename(inputFile)}:`, error.message, stderr);
|
||||
|
||||
Binary file not shown.
@@ -58,4 +58,60 @@ Centered content
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).toBe(input);
|
||||
});
|
||||
|
||||
test('preserves HTML artifacts inside fenced code blocks', () => {
|
||||
const input = `# Title
|
||||
|
||||
\`\`\`
|
||||
<style>body{}</style>
|
||||
<!-- comment -->
|
||||
<div align="center">text</div>
|
||||
\`\`\`
|
||||
|
||||
After code.
|
||||
`;
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).toContain('<style>body{}</style>');
|
||||
expect(output).toContain('<!-- comment -->');
|
||||
expect(output).toContain('<div align="center">text</div>');
|
||||
expect(output).toContain('After code.');
|
||||
});
|
||||
|
||||
test('preserves HTML artifacts inside inline code', () => {
|
||||
const input = 'Use `<div align="center">` for alignment.';
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).toContain('`<div align="center">`');
|
||||
});
|
||||
|
||||
test('handles uppercase tags and unquoted attributes', () => {
|
||||
const input = `<DIV align=center>
|
||||
Centered
|
||||
</DIV>
|
||||
`;
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).not.toContain('<DIV');
|
||||
expect(output).not.toContain('</DIV>');
|
||||
expect(output).toContain('Centered');
|
||||
});
|
||||
|
||||
test('handles single-quoted attributes', () => {
|
||||
const input = `<div align='right'>Right</div>`;
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).not.toContain('<div');
|
||||
expect(output).not.toContain('</div>');
|
||||
expect(output).toContain('Right');
|
||||
});
|
||||
|
||||
test('removes non-alignment div tags without leaving malformed HTML', () => {
|
||||
const input = `<div class="note">Note text</div>`;
|
||||
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
|
||||
expect(output).not.toContain('<div');
|
||||
expect(output).not.toContain('</div>');
|
||||
expect(output).toContain('Note text');
|
||||
});
|
||||
|
||||
test('returns non-string input unchanged', () => {
|
||||
expect(WordTemplateExporter.preprocessMarkdownForWordExport(null)).toBeNull();
|
||||
expect(WordTemplateExporter.preprocessMarkdownForWordExport(123)).toBe(123);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user