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

bug fixes #17

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

bug fixes #17

wants to merge 22 commits into from

Conversation

muriloime
Copy link
Contributor

@muriloime muriloime commented Mar 16, 2020

Fixes:

  1. Get games in correct order
  2. Get variations with correct move order
  3. Default MoveText#variations to [] instead of nil (This seemed more logical to me)
  4. Clean comments: remove '{', '}', and change all blank characters to spaces

def to_s
@notation
end

def clean_text(text)
text&.gsub(/{(.*)}/, '\1')&.gsub(/\s+/, ' ')&.strip
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why get rid of curly braces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just realized I did not open a new branch for the bug fixes I proposed. My master diverged too much from the gem already. It has many fixes/features now.

The curly braces in particular I just thought it made more sense to remove them alltogether in a later commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple of more additions in my master , in the case you are interested, at least:

  1. Adding the pgn and game comment string to game object
  2. Fix bug when there are no moves in pgn ( only comments)
  3. Properly handle "don't care" variations

Copy link

@lexisvar lexisvar Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muriloime @capicue How Can I allow tag_values with special characters like Ññ?

for example in the line [WhiteTeam "NARIÑO"] I got this error:

Encoding::CompatibilityError:
       incompatible encoding regexp match (UTF-8 regexp with ISO-8859-1 string)

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

Successfully merging this pull request may close these issues.

3 participants