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

Ipe fails to parse valid path #274

Open
tinloaf opened this issue Nov 14, 2019 · 3 comments
Assignees

Comments

@tinloaf
Copy link

@tinloaf tinloaf commented Nov 14, 2019

If I understand the documentation correctly, this is a valid ipe file:

<?xml version="1.0"?>
<!DOCTYPE ipe SYSTEM "ipe.dtd">
<ipe version="70212" creator="Ipe 7.2.13">
<page>
<layer name="alpha"/>
<view layers="alpha" active="alpha"/>
<path layer="alpha" stroke="black">
64 480 m
192 480 l
h
0 0 m
</path>
</page>
</ipe>

However, ipe fails to parse the path. Sure, the starting of a new subpath as last operation in the path is nonsensical - however, such paths are created by svgtoipe if the respective SVG path does the same, i.e., starts a new nonsensical subpath as the last operation. Such SVGs seem to be generated by some tools (in this case: Inkscape) - and they are valid according to the SVG specs, I think.

@otfried otfried self-assigned this Nov 14, 2019
@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 14, 2019

It was on my to-do list to fix svgtoipe so that it no longer generates the trailing moveto - but you are right, it sounds much easier to let Ipe silently ignore them.

@tinloaf

This comment has been minimized.

Copy link
Author

@tinloaf tinloaf commented Nov 14, 2019

I just implemented that fix in my working copy of svgtoipe. I might submit a PR for svgtoipe some time soon anyways, that should include that fix.

@tinloaf

This comment has been minimized.

Copy link
Author

@tinloaf tinloaf commented Nov 14, 2019

Similar problem - this file with an empty path also crashes ipe, generated by svgtoipe:

<?xml version="1.0"?>
<!DOCTYPE ipe SYSTEM "ipe.dtd">
<ipe version="70212" creator="Ipe 7.2.13">
<page>
<layer name="alpha"/>
<view layers="alpha" active="alpha"/>
<path>
</path>
</page>
</ipe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.