for each line, trim trailing/heading white spaces and tabs#6
Open
jo-chemla wants to merge 1 commit into
Open
Conversation
Collaborator
|
Thanks for the PR. Can you add the exact test case from cpt-city which needs this trimming? |
Author
|
Here are some CPTs, open-licence only according to cpt-view, which were breaking parsing without trimming, and for which parsing succeed when trimming. I've added the cpt + jsons to the fixtures folder. Hope this helps and your PRs to chromajs also get merged! {
"name": "wiki-knutux",
"path": "cpt-city/wkp/knutux/wiki-knutux.cpt",
"directory": "cpt-city/wkp/knutux",
"content": "# knutux-lith.cpt\n#\n# elevation scheme for Lithuania taken from\n# http://fr.wikipedia.org/wiki/Fichier:LithuaniaPhysicalMap-Detailed.png\n# Author: Andrius Ramanauskas (User:Knutux), 2006\n# Licence: GFDL\n#\n# J.J. Green 2012\n# $Id\n#\n# COLOR_MODEL = RGB\n 0 74 173 90 40 74 173 90\n 40 116 195 83 80 116 195 83 \n 80 181 214 99 120 181 214 99 \n120 222 222 99 160 222 222 99 \n160 255 231 16 200 255 231 16 \n200 255 206 8 240 255 206 8 \n240 255 156 8 280 255 156 8 \n280 255 123 16 320 255 123 16 \nB 0 0 0\nF 255 255 123\nN 128 128 128\n",
"license": "cc3",
"distribute": "yes",
"author": "Knutux (Andrius Ramanauskas)",
"copyingFile": "cpt-city/wkp/knutux/COPYING.xml",
"isOpenLicense": true
},
{
"name": "bhw1_01",
"path": "cpt-city/bhw/bhw1/bhw1_01.cpt",
"directory": "cpt-city/bhw/bhw1",
"content": "# cpt-city/bhw/bhw1/bhw1_01.cpt\n# autogenerated GMT palette \"bhw1\"\n# cptutils version 1.46, Wed Aug 15 23:37:37 2012\n# COLOR_MODEL = RGB\n 0 244 168 48 46 230 78 92\n 46 230 78 92 100 173 54 228\nB 0 0 0\nF 255 255 255\nN 255 0 0\n",
"license": "cc3",
"distribute": "yes",
"author": "Blackheartedwolf",
"copyingFile": "cpt-city/bhw/COPYING.xml",
"isOpenLicense": true
},
{
"name": "ETOPO1-Reed",
"path": "cpt-city/ngdc/ETOPO1-Reed.cpt",
"directory": "cpt-city/ngdc",
"content": "# ETOP1-Reed Colour map for ETOPO1 \n#\n# Derived from the ETOPO1 map (Anderson, Varner\n# Lim) by Greg Reed of the Australian Ocean Data \n# Centre Joint Facility, converted to the cpt \n# format by J.J. Green.\n#\n# COLOR_MODEL = RGB\n-11000 16 6 180 -8000 16 6 180\n -8000 0 14 203 -6000 0 14 203 \n -6000 12 68 231 -4000 12 68 231\n -4000 21 158 252 -2000 21 158 252\n -2000 65 200 255 -1000 65 200 255\n -1000 94 223 255 -500 94 223 255\n -500 138 227 255 0 138 227 255\n 0 51 102 \t 0 100 0 51 102\n 100 51 204 102 500 51 204 102\n 500 255 220 185 1000 255 220 185\n 1000 243 202 137 2000 243 202 137\n 2000 217 166 39 4000 217 166 39\n 4000 159 123 13 6000 159 123 13\n 6000 178 118 118 8500 178 118 118\n",
"license": "gplv2",
"distribute": "yes",
"author": "Lester M. Anderson\n CASP, UK",
"copyingFile": "cpt-city/ngdc/COPYING.xml",
"isOpenLicense": true
},
{
"name": "Sunset_Real",
"path": "cpt-city/nd/atmospheric/Sunset_Real.cpt",
"directory": "cpt-city/nd/atmospheric",
"content": "# cpt-city/nd/atmospheric/Sunset_Real.cpt\n# autogenerated GMT palette \"Atmospheric_Sunset_Real\"\n# cptutils version 1.46, Wed Aug 15 23:34:33 2012\n# COLOR_MODEL = RGB\n 0.00 191 0 0 8.85 223 85 0\n 8.85 223 85 0 20.37 255 170 0\n 20.37 255 170 0 33.39 217 85 89\n 33.39 217 85 89 53.26 178 0 178\n 53.26 178 0 178 77.77 89 0 195\n 77.77 89 0 195 100.00 0 0 212\nB 0 0 0\nF 255 255 255\nN 255 0 0\n",
"license": "gpl",
"distribute": "yes",
"author": "Nevit Dilmen",
"copyingFile": "cpt-city/nd/COPYING.xml",
"isOpenLicense": true
},
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #5