Commit graph

14 commits

Author SHA1 Message Date
JK
e427438d1f fix lint II 2026-06-04 21:26:06 +02:00
JK
157c0b57ab lin fix I 2026-06-04 21:01:36 +02:00
JK
b6392a5523 refactor: reorganize src into modular structure and increase test coverage 2026-06-04 20:50:07 +02:00
JK
88cb4e38d5 fix lint more updating 2026-06-04 20:12:07 +02:00
JK
bcc1be7933 updating the plugin 2026-06-04 20:12:07 +02:00
JK
d1d809f029 fix(live-preview): fixed cursor kicking when editing referenced block 2026-06-04 20:12:05 +02:00
JK
a3d9e1e494 fix(callout): Implement custom rendering for equation links and numbers in dynamically rendered callouts. 2026-06-04 20:12:05 +02:00
JK
138e40e4b2 fix: resolve pdf export issues and callout math formatting validation
Major fixes including:
- fix(pdf): remove legacy rendering hack that caused export failures in newer Obsidian versions
- fix(core): ensure auto-injected IDs and tags correctly inherit callout indentation (fixes "zombie lines" and broken previews)
- feat: add "Fix callout equations in active note" command to repair existing malformed content
- refactor: centralize callout parsing logic in `src/utils/parse.ts` for SOLID/DRY compliance
2026-06-04 20:12:04 +02:00
JK
74292ebc70 cleanup: Remove unused code and simplify utilities
- Removed unused module declaration in `src/declarations.d.ts`.
- Cleaned up `live-preview-equations.ts` by removing unused imports and the `EquationNumberWidget` class.
- Simplified `editor.ts` by removing redundant utility functions.
- Streamlined `general.ts` by eliminating unused helper functions.
- Refactored `obsidian.ts` to remove obsolete file utilities, cache/metadata handlers, and markdown view helpers.
- Deleted the `parseLatexComment` function from `parse.ts`.
- Removed the `render.ts` file, which contained unused rendering utilities.
- Overall, reduced code clutter and improved maintainability.
2026-06-04 20:12:03 +02:00
JK
31008d1443 refactor: remove legacy equation and search modules; update imports for new feature structure
- Deleted `numbering.ts`, `reading-view.ts`, and `core.ts`, removing outdated logic for equation numbering and search.
- Updated `main.ts` to use new import paths under `features/` directory.
- Removed references to deleted modules and ensured all imports reflect the reorganized feature-based structure.
- Internal refactor to modularize and modernize the codebase; no user-facing features affected.
2026-06-04 20:12:02 +02:00
JK
4eb40c41e2 feat: add sub-equation reference support and improve equation tagging logic
- Updated reference parsing to support sub-equation links (e.g., [[#^eq-abc-2]]).
- Enhanced tag manager to handle multi-tagging with sub-indices (e.g., \tag{1.2}).
- Improved single-tag logic for consistent cleanup and insertion.
- Propagated sub-index data through numbering.ts and provider.ts.
- Extended `EquationBlock` with `$subIndices?: Set<number>` for granular tracking.
- Modified reading view to suppress numbering for sub-indexed equations.
- Refactored block ID insertion to use comment format (`% id: eq-...`) before closing $$.
- Cleaned up legacy code and improved comments for clarity and consistency.
2026-06-04 20:12:02 +02:00
JK
f8b3725ae3 refactor: improve equation numbering logic and consistency across views
- Rewrote live preview equation numbering using `EquationInfo` and a robust math block parser.
- Added `TagManager` to manage `\tag{...}` commands based on reference counts and settings.
- Injected unique internal IDs into all math blocks.
- Enhanced `processActiveNoteEquations` to support both legacy and new-style equation links.
- Refactored reading view processor to read file content directly, supporting embeds, hover preview, and PDF export.
- Improved mapping of math block positions to equation numbers, avoiding duplicates.
- Ensured consistent equation referencing and numbering across all plugin views.
- Cleaned up and modularized code for better maintainability and future extensibility
2026-06-04 20:12:02 +02:00
JK
e31a9b0cb2 refactor: streamline equation referencing and plugin settings
Simplified plugin settings:
- Replaced multi-profile settings with a single `PluginSettings` object.
- Removed legacy fields and logic (e.g., `extraSettings`, `indexManager`, theorem/proof callouts).
- Flattened settings structure for easier loading/saving.

Standardized equation types:
- Unified all equation-related types to use `EquationBlock` from `types`.
- Updated imports across cleveref.ts, provider.ts, numbering.ts, live-preview.ts, and core.ts.
- Refactored `processActiveNoteEquations` to use plugin settings directly.

Refactored provider and equation number logic:
- Simplified `CleverefProvider` by removing index-based logic.
- Updated equation number widget and reading view to use new types and settings.

Improved search and suggestions:
- Refactored `ActiveNoteSearchCore` to use updated provider and settings.
- Unified suggestion rendering and link insertion logic.

General cleanup:
- Removed dead, commented, and obsolete code.
- Reduced indirection and legacy compatibility layers for better maintainability.
2026-06-04 20:12:01 +02:00
JK
7e75089cb2 initializing 2026-06-04 20:11:56 +02:00