Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex_to_text() + \\href: error #117

Open
nschloe opened this issue Dec 30, 2024 · 0 comments
Open

latex_to_text() + \\href: error #117

nschloe opened this issue Dec 30, 2024 · 0 comments

Comments

@nschloe
Copy link

nschloe commented Dec 30, 2024

  • MWE:

    from pylatexenc.latex2text import LatexNodes2Text
    import pylatexenc
    
    print(pylatexenc.__version__)
    
    string = "\\href{https://a.b/c}{Lorem ipsum}"
    
    LatexNodes2Text().latex_to_text(string)
  • Actual output:

    Error:

    3.0alpha000030
      '{} <{}>'.format(l2tobj.nodelist_to_text([n.nodeargd.argnlist[1]]),
                                                ~~~~~~~~~~~~~~~~~~~^^^
    IndexError: list index out of range
    
  • Expected output:

    Lorem ipsum
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant