{"id":22208457,"url":"https://github.com/oscarmarcusson/whitespacenet","last_synced_at":"2026-06-25T12:31:17.976Z","repository":{"id":212857880,"uuid":"732295090","full_name":"OscarMarcusson/whitespaceNET","owner":"OscarMarcusson","description":"A C# utility for scanning the significant whitespace hierarchy of a string","archived":false,"fork":false,"pushed_at":"2023-12-16T19:26:51.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T04:42:56.941Z","etag":null,"topics":["csharp","hierarchy-structure","indentation-depth","indentation-parsing","parser","whitespace"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/WhitespaceNET","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OscarMarcusson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-16T07:37:23.000Z","updated_at":"2023-12-16T19:26:06.000Z","dependencies_parsed_at":"2023-12-16T20:27:43.858Z","dependency_job_id":null,"html_url":"https://github.com/OscarMarcusson/whitespaceNET","commit_stats":null,"previous_names":["oscarmarcusson/whitespacenet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OscarMarcusson%2FwhitespaceNET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OscarMarcusson%2FwhitespaceNET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OscarMarcusson%2FwhitespaceNET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OscarMarcusson%2FwhitespaceNET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OscarMarcusson","download_url":"https://codeload.github.com/OscarMarcusson/whitespaceNET/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401372,"owners_count":20609163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","hierarchy-structure","indentation-depth","indentation-parsing","parser","whitespace"],"created_at":"2024-12-02T19:19:33.629Z","updated_at":"2026-06-25T12:31:17.952Z","avatar_url":"https://github.com/OscarMarcusson.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhitespaceNET\n\nThis utility enables easy parsing of significant whitespace text, like python or yaml files. It is a useful base for creating custom file formats or programming languages that utilises indentation for scope.\n\n## Full text scan\n\n```csharp\nvar doc = Hierarchy.FromString(@\"\n    example: yaml\n    with-hierarchy:\n        a: 3\n        b: Example\n    \");\nConsole.WriteLine(doc.Length);              // 2\nConsole.WriteLine(doc[0].text);             // example: yaml\nConsole.WriteLine(doc[1].text);             // width-hierarchy:\nConsole.WriteLine(doc[1].content.Count);    // 2\nConsole.WriteLine(doc[1].content[0].text);  // a: 3\nConsole.WriteLine(doc[1].content[1].text);  // b: Example\n```\n\n## Indentation of a single line\n\n```csharp\nvar indentation = WhitespaceReader.IndentationOf(\"\\t\\tHello World\");\nConsole.WriteLine(indentation); // 2\n```\n\nIt is also possible to supply custom parsing rules with the settings class:\n\n```csharp\nvar indentation = WhitespaceReader.IndentationOf(\"      Hello World\", new Settings\n{\n    tabSizeInSpaces = 2\n});\nConsole.WriteLine(indentation); // 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmarcusson%2Fwhitespacenet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscarmarcusson%2Fwhitespacenet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscarmarcusson%2Fwhitespacenet/lists"}