atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Fix and improve multiline strings #44

Closed winstliu closed 8 years ago

winstliu commented 8 years ago

Fixes #10 Fixes #30 Fixes #33 Supersedes and closes #36 Supersedes and closes #38

Summary of changes:

Sorry for the crazy yaml-spec.coffee diff...fixing near top-level scopes tends to break a lot of specs.

/cc @flynfish, @stuartpb, and @alexjurkiewicz for testing

alexjurkiewicz commented 8 years ago

Wow!! I'm on hols so can't test for a while but 👏

On Sun, 3 Apr 2016, 3:25 AM Wliu notifications@github.com wrote:

Fixes #10 https://github.com/atom/language-yaml/issues/10 Fixes #30 https://github.com/atom/language-yaml/issues/30 Fixes #33 https://github.com/atom/language-yaml/issues/33 Supersedes and closes #36 https://github.com/atom/language-yaml/pull/36 Supersedes and closes #38 https://github.com/atom/language-yaml/pull/38

Summary of changes:

  • Regular keys now support block-level strings so that specifying > or | is no longer needed
  • Keys with multiple spaces are now properly detected
  • Fixed incorrect scopes

Sorry for the crazy yaml-spec.coffee diff...fixing near top-level scopes tends to break a lot of specs.

/cc @flynfish https://github.com/flynfish, @stuartpb https://github.com/stuartpb, and @alexjurkiewicz

https://github.com/alexjurkiewicz for testing

You can view, comment on, or merge this pull request online at:

https://github.com/atom/language-yaml/pull/44 Commit Summary

  • Tokenize multiline strings without | or >
  • Stop parsing multiline strings when we hit a tag
  • Keep tokenizing after comments
  • Fix catastrophic backtracking and comment scopes
  • Match comments at the beginning of a line
  • Better key detection for block quotes
  • Add some more specs
  • Whitespace fixes
  • More precisely scope string.unquoted.block

File Changes

Patch Links:

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/atom/language-yaml/pull/44

winstliu commented 8 years ago

Hi @alexjurkiewicz, just making sure you didn't forget about this :smile:. If you need instructions on how to test this locally just ask.

alexjurkiewicz commented 8 years ago

Sorry for the slow response! Back in civilisation, will try to test later this week.

On Tue, 10 May 2016 at 11:59 Wliu notifications@github.com wrote:

Hi @alexjurkiewicz https://github.com/alexjurkiewicz, just making sure you didn't forget about this [image: :smile:]. If you need instructions on how to test this locally just ask.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/atom/language-yaml/pull/44#issuecomment-218040050

winstliu commented 8 years ago

@alexjurkiewicz Any chance you can take a look soon? :bow:

alexjurkiewicz commented 8 years ago

Sorry -- I don't touch a lot of YAML files with multiline strings any more. If you'd like me to, I can test the examples I posted in #33 I guess?

On Sat, 13 Aug 2016 at 05:42 Wliu notifications@github.com wrote:

@alexjurkiewicz https://github.com/alexjurkiewicz Any chance you can take a look soon? 🙇

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/atom/language-yaml/pull/44#issuecomment-239541939, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXKdWvr4iDUucl19RaMv3YetHAa9-Xyks5qfMy7gaJpZM4H-W31 .

winstliu commented 8 years ago

I already did that while writing this PR. As this has been sitting here now for a couple of months, I'm going to merge it so that it can get a bit more exposure on master.