aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox/anki-template-renderer.js
Commit message (Collapse)AuthorAge
* Template helper function improvements (#439)toasted-nutbread2023-12-25
| | | | | * Flag fn and inverse as optional * Properly handle different modalities of helper functions
* move dictionary files to dictionary folder (#429)StefanVukovic992023-12-23
|
* rename variables (#409)Cashew2023-12-20
| | | | | | | | | | | * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions
* Update eslint spacing rules (#366)toasted-nutbread2023-12-17
| | | | | | | | | * Add space-infix-ops rule * Add no-multi-spaces --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Fix bugtoasted-nutbread2023-11-29
|
* Revert "Use import map"toasted-nutbread2023-11-27
|
* Use import maptoasted-nutbread2023-11-27
|
* Updatestoasted-nutbread2023-11-27
|
* Add JSDoc type annotations to project (rebased)toasted-nutbread2023-11-27
|
* Switch to vitest for ESM support; other fixesDarius Jahandarie2023-11-08
|
* Modernize codebaseDarius Jahandarie2023-11-04
| | | | | | - Use ES modules - Remove vendored libs and build them from npm using esbuild - Switch from JSZip to zip.js
* remove kanjiLinks and sanitizeCssClasspraschke2023-10-17
|
* fix: regexReplace and regexMatchpraschke2023-10-17
| | | | | joining the args together without cutting out the options arg can add an '[object Object]' into the result.
* fix: formatGlossarypraschke2023-10-17
|
* fix: furigana and furiganaPlainpraschke2023-10-17
|
* fix: dumpObjectpraschke2023-10-17
|
* fixed eslint, changed header to only use 2 spaces, added missing headers to testAustin Siew2023-03-22
|
* Updated LICENSE to full license, added Yomitan 2023 to all license headersAustin Siew2023-03-21
|
* ESlint JSdoc (#2148)toasted-nutbread2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
* Structured content auto language (#2131)toasted-nutbread2022-05-14
| | | | | | | | | | | | | | | | | | | | | | * Pass JapaneseUtil instance to StructuredContentGenerator * Move body of createStructuredContent to an internal function * Create _createStructuredContentGenericElement * Wrap structured content in a <span> * Change _createStructuredContent to _appendStructuredContent * Add public appendStructuredContent function * Add missing return * Remove unused _createDocumentFragment * Automatically assign lang=ja for content with Japanese characters without an explicit language * Add test
* AnkiTemplateRendererContentManager (#2088)toasted-nutbread2022-03-14
| | | | | | | | | * Make function private * Update comments * Refactor the content manager that is provided to StructuredContentGenerator in AnkiTemplateRenderer * Update function to not be async, for API parity
* Update copyright date (#2062)toasted-nutbread2022-02-02
| | | | | | | * Update eslint settings * Update 2021 files * Update other files
* Katakana to hiragana conversion options (#1965)toasted-nutbread2021-09-27
| | | | | | | | | | | | | * Refactor convertKatakanaToHiragana * Add keepProlongedSoundMarks option * Test keepProlongedSoundMarks option * Refactor * Add keepProlongedSoundMarks option to hiragana handlebars helper * Update documentation
* Fix regexMatch and regexReplace handlebars helper functions (#1958)toasted-nutbread2021-09-26
|
* Anki template regex helper updates (#1934)toasted-nutbread2021-09-05
| | | | | * Update regexReplace and regexMatch to support content arguments * Update documentation
* Structured content data (#1930)toasted-nutbread2021-09-04
| | | | | | | | | | | * Add support for structured-content data attributes * Assign dataset properties * Don't remove data-sc attributes * Use helper functions * Update test data
* Hiragana & katakana helpers (#1908)toasted-nutbread2021-08-25
| | | | | | | * Add hiragana and katakana template helpers * Update documentation * Fix documentation
* Pronunciation template helper (#1840)toasted-nutbread2021-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename field * Set up pronunication components * Fix documentation * Rename function * Update test dependencies * Fix constructor * Log errors * Add pronunciation helper * Add styleApplier argument to _getHtml/_normalizeHtml * Use getAttribute for 'class' to support namespaced elements (e.g. svg) * Update format name * Add optional tag * Update docs
* Anki template renderer abstraction (#1839)toasted-nutbread2021-07-18
* Add AnkiTemplateRenderer abstraction * Move Anki-specific template functionality into AnkiTemplateRenderer * Add documentation comments