Inline template-replacement
See original GitHub issueThere is another question I have according to your plans for the output rendering, The output can be precised defined by a template like Handlebars or Mustache.
An output template will look like
## {{title}}
in Markdown,
\subsection{ {{title}} }
in LaTeX
<h2>{{title}}</h2>
in HTML.
Basic principle of template engine:
- use a template for generation of a compiler function
ast4title
. (only once) - multiple applications of this compiler function with different JSON
ast4title('html',pMyTitle,pOptions)
. pMyTitle
is a JSON that contains the title inpMyTitle.title
. The string value oftitle
will be replaced by the compiler in the template of the output languagehtml
,- the compiled output will be return from the function
my_title_in_html = ast4title('html',pMyTitle,pOptions)
. - The first parameter defines the output format.
Iterations over lists are possible with these template engines
foreach
(see Handlebars https://handlebarsjs.com/builtin_helpers.html ) . Does it make sense to you to reduce your work for output rendering forwtf_wikipedia
by using the handlebars or other template engines by requiring those NPM modules inwtf_wikipedia
? Those templates defined the output node handlers for the Abstract Syntax Tree (AST), similar to want you are currently doning insrc/output
.
This comment might be irrelevant, if you have e.g. some performance befefits from implementing that in the way to have planed it currently in the dev
-branch.
Best regards with great appreciations for your work for refactoring wtf_wikipedia
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
C++ template and inline - Stack Overflow
What would happen if the inline is a qualifier for a function template, which is not a member of a class? Is inline...
Read more >Inline template steps - options for batch execution - IBM
This field contains the executable code that is run by the step. It is possible to use variable substitution in this field. To...
Read more >Defining Inline and External Templates, and Using Relative ...
Instead of template , we have used templateUrl , and we replaced styles with styleUrls . These changes are essential because both properties ......
Read more >Vue 3.0 - default slot as replacement for inline-template
JS ; 1. const app = Vue.createApp({}); ; 2. ; 3. app.component("test-default-slot", { ; 4. template: '<slot v-bind="self"/>', ; 5. computed: {....
Read more >Replace iframe inline template with an actual template - Drupal
For the purpose of code cleanliness, replace the inline template used for generating the iframe with an actual template.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Depended on the library or format in which the math expressions are rendered, the HTML export will look different
toHTML.js
. We should create a foldersrc/math
that is reponsible for handling math expressions.Yes as recommended in the wiki, If you alter the wiki recommendation in way that is OK for you, then I will follow that route of implementation and support you. Would recommend to convert the results of discussion in
issues
into a proposal for implementation in thewiki
, that will serve as guideline for all developers that support you. At the same time we have the documentation ready. Use theMathJax
syntax for rending math expression as output. With MathJax we can preserve the LaTeX math in HTML output without any need to alter the provide math expression. See MathJax in Wikias of v8 our 4 output formats have been split-out into plugins, which may help in your work in wikiversity. Let me know if there’s anything I can do.