Download packages/mathml2omml/src/ooml/scriptlevel.js from muthuk1/OpenMAIC-React: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/muthuk1/OpenMAIC-React/resolve/main/packages/mathml2omml/src/ooml/scriptlevel.js
- Command line
-
hf download hf://muthuk1/OpenMAIC-React/packages/mathml2omml/src/ooml/scriptlevel.js
-
curl -L -o scriptlevel.js https://huggingface.co/muthuk1/OpenMAIC-React/resolve/main/packages/mathml2omml/src/ooml/scriptlevel.js
477 Bytes
| export function addScriptlevel(target, ancestors) { | |
| const scriptlevel = ancestors.find((ancestor) => ancestor.attribs?.scriptlevel)?.attribs | |
| ?.scriptlevel | |
| if (['0', '1', '2'].includes(scriptlevel)) { | |
| target.children.unshift({ | |
| type: 'tag', | |
| name: 'm:argPr', | |
| attribs: {}, | |
| children: [ | |
| { | |
| type: 'tag', | |
| name: 'm:scrLvl', | |
| attribs: { 'm:val': scriptlevel }, | |
| children: [] | |
| } | |
| ] | |
| }) | |
| } | |
| } | |