Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mathml2omml

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathml2omml - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

src/helpers.js

2

package.json
{
"name": "mathml2omml",
"version": "0.2.1",
"version": "0.2.2",
"description": "a MathML to OMML converter ",

@@ -5,0 +5,0 @@ "main": "src/index.js",

import { xml2js, js2xml } from 'xml-js'
import { walker } from './walker'
import { cleanText } from './helper'
import { walker } from './walker.js'
import { cleanText } from './helpers.js'

@@ -6,0 +6,0 @@ class MML2OMML {

@@ -1,18 +0,18 @@

export { math, semantics } from './math'
export { menclose } from './menclose'
export { mfrac } from './mfrac'
export { mglyph } from './mglyph'
export { mmultiscripts } from './mmultiscripts'
export { mrow } from './mrow'
export { mspace } from './mspace'
export { msqrt } from './msqrt'
export { mstyle } from './mstyle'
export { msub } from './msub'
export { msubsup } from './msubsup'
export { msup } from './msup'
export { mtable, mtd, mtr } from './table'
export { munderover } from './munderover'
export { mtext, mi, mn, ms, mo, getTextContent } from './text_container'
export { munder, mover } from './under_or_over'
export { mroot } from './mroot'
export { text } from './text'
export { math, semantics } from './math.js'
export { menclose } from './menclose.js'
export { mfrac } from './mfrac.js'
export { mglyph } from './mglyph.js'
export { mmultiscripts } from './mmultiscripts.js'
export { mrow } from './mrow.js'
export { mspace } from './mspace.js'
export { msqrt } from './msqrt.js'
export { mstyle } from './mstyle.js'
export { msub } from './msub.js'
export { msubsup } from './msubsup.js'
export { msup } from './msup.js'
export { mtable, mtd, mtr } from './table.js'
export { munderover } from './munderover.js'
export { mtext, mi, mn, ms, mo } from './text_container.js'
export { munder, mover } from './under_or_over.js'
export { mroot } from './mroot.js'
export { text } from './text.js'

@@ -1,2 +0,2 @@

import { walker } from '../walker'
import { walker } from '../walker.js'

@@ -3,0 +3,0 @@ export function mfrac (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,3 +0,3 @@

import { walker } from '../walker'
import { getTextContent } from './text_container'
import { walker } from '../walker.js'
import { getTextContent } from '../helpers.js'

@@ -4,0 +4,0 @@ export function mroot (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,3 +0,3 @@

import { walker } from '../walker'
import { getNary, getNaryTarget } from '../ooml'
import { walker } from '../walker.js'
import { getNary, getNaryTarget } from '../ooml/index.js'

@@ -4,0 +4,0 @@ export function msub (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,3 +0,3 @@

import { walker } from '../walker'
import { getNary, getNaryTarget } from '../ooml'
import { walker } from '../walker.js'
import { getNary, getNaryTarget } from '../ooml/index.js'

@@ -4,0 +4,0 @@ export function msubsup (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,3 +0,3 @@

import { walker } from '../walker'
import { getNary, getNaryTarget } from '../ooml'
import { walker } from '../walker.js'
import { getNary, getNaryTarget } from '../ooml/index.js'

@@ -4,0 +4,0 @@ export function msup (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,3 +0,3 @@

import { walker } from '../walker'
import { getNary, getNaryTarget } from '../ooml'
import { walker } from '../walker.js'
import { getNary, getNaryTarget } from '../ooml/index.js'

@@ -4,0 +4,0 @@ export function munderover (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -1,2 +0,2 @@

import { getStyle } from './text_style'
import { getStyle } from './text_style.js'

@@ -111,20 +111,2 @@ const STYLES = {

export function getTextContent (node, trim = true) {
let returnString = ''
if (node.type === 'text') {
let text = node.text.replace(/[\u2062]|[\u200B]/g, '')
if (trim) {
text = text.trim()
}
returnString += text
} else if (node.elements) {
node.elements.forEach(
subNode => {
returnString += getTextContent(subNode, trim)
}
)
}
return returnString
}
export function mtext (element, targetParent, previousSibling, nextSibling, ancestors) {

@@ -131,0 +113,0 @@ return textContainer(element, targetParent, previousSibling, nextSibling, ancestors, 'mtext')

@@ -1,2 +0,2 @@

import { getTextContent } from './text_container'
import { getTextContent } from '../helpers.js'

@@ -3,0 +3,0 @@ export function getStyle (element, ancestors, previousStyle = {}) {

@@ -1,5 +0,5 @@

import { walker } from '../walker'
import { getNary, getNaryTarget } from '../ooml'
import { walker } from '../walker.js'
import { getNary, getNaryTarget } from '../ooml/index.js'
import { getTextContent } from './text_container'
import { getTextContent } from '../helpers.js'

@@ -6,0 +6,0 @@ const UPPER_COMBINATION = {

@@ -1,2 +0,2 @@

export { getNary, getNaryTarget } from './nary'
export { addScriptlevel } from './scriptlevel'
export { getNary, getNaryTarget } from './nary.js'
export { addScriptlevel } from './scriptlevel.js'

@@ -1,2 +0,2 @@

import { getTextContent } from '../mathml'
import { getTextContent } from '../helpers.js'

@@ -3,0 +3,0 @@ const NARY_REGEXP = /^[\u220f-\u2211]|[\u2229-\u2233]|[\u22c0-\u22c3]$/

@@ -1,3 +0,3 @@

import { addScriptlevel } from './ooml'
import * as mathmlHandlers from './mathml'
import { addScriptlevel } from './ooml/index.js'
import * as mathmlHandlers from './mathml/index.js'

@@ -4,0 +4,0 @@ export function walker (element, targetParent, previousSibling = false, nextSibling = false, ancestors = []) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc