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

Carrier names containing semicolons not correctly parsed by k2f.mjs #9

Open
t0mpr1c3 opened this issue Dec 11, 2023 · 1 comment
Open

Comments

@t0mpr1c3
Copy link
Contributor

e.g. on the patched version in commit e472b86

;!knitout-2
;;Carriers: 1 2 ; 4 5
in 1
in 2
in ;
in 4
in 5
knit - f0 1 2 ; 4 5

gives

...
Carrier names were not integers in order, so using position-based remapping.
Carrier names map to yarn numbers as follows:
  '1' -> 1
  '2' -> 2
  ';' -> 3
  '4' -> 4
  '5' -> 5
test1.k:5: ERROR: Can't bring in no carriers
@ixchow
Copy link
Member

ixchow commented Dec 11, 2023

I would argue that this is working as intended. It is valid to have a carrier named with a semicolon, but you obviously can't use it in an operation since instructions are split at ; into the instruction and comment parts! :-)

Probably I should have thought this through a bit more in the issue thread over on the knitout repository. But I still maintain that this is correct behavior. The specification makes it clear that the comment part of a line starts at the first ';' in that line and is not part of the operation.

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

2 participants