Skip to content

Fix types for formattingHanlder #95

@github-actions

Description

@github-actions

Fix types for formattingHanlder

// @ts-expect-error TODO: Fix types for formattingHanlder

    if (!prop || !('w:val' in prop) || !prop['w:val'] || prop['w:val'] === '0') {
      return text
    }

    const tagName = name.replace(/\w+:/, '') as keyof typeof h.formattingHandlers
    const handler = h.formattingHandlers[tagName]
    if (handler) {
      text = handler(
        h,
        text,
        // @ts-expect-error TODO: Fix types for formattingHanlder
        prop,
        node,
      )
    }
    return text
  }, text as UnifiedLatexNode | UnifiedLatexNode[])
  return formattedText
}

002092943ea076daf78d55badaa52c7c12e1cf99

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions