{"id":17126445,"url":"https://github.com/kellpossible/fluent-multiline-bug","last_synced_at":"2025-03-24T03:45:17.038Z","repository":{"id":71253127,"uuid":"291278650","full_name":"kellpossible/fluent-multiline-bug","owner":"kellpossible","description":"Minimal Example for Fluent Issue #191","archived":false,"fork":false,"pushed_at":"2021-01-12T09:48:17.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T10:15:43.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kellpossible.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-29T13:41:56.000Z","updated_at":"2020-08-29T13:43:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"d13a76a2-23b2-46c4-8e73-23412bb61b03","html_url":"https://github.com/kellpossible/fluent-multiline-bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Ffluent-multiline-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Ffluent-multiline-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Ffluent-multiline-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Ffluent-multiline-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kellpossible","download_url":"https://codeload.github.com/kellpossible/fluent-multiline-bug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245206530,"owners_count":20577582,"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":[],"created_at":"2024-10-14T18:48:03.454Z","updated_at":"2025-03-24T03:45:17.007Z","avatar_url":"https://github.com/kellpossible.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal Example for [Fluent Issue #191](https://github.com/projectfluent/fluent-rs/issues/191)\n\nThis is a minimal reproduction of the issue \u003chttps://github.com/projectfluent/fluent-rs/issues/191\u003e.\n\nThe expected successful output of the program is the following:\n\n```txt\nContents of test.ftl:\n\nsimple-message = Hello\nmultiline-message = Hello this is\n    a multiline message\n    using fluent.\nmultiline-message-selector = { $size -\u003e\n        [big] Big\n        *[medium] Medium\n        [small] Small\n    }\nsimple-arg = Hello {$name}\n\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"simple-message\" }, value: Some(Pattern { elements: [TextElement(\"Hello\")] }), attributes: [], comment: None }))\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"simple-arg\" }, value: Some(Pattern { elements: [TextElement(\"Hello \"), Placeable(InlineExpression(VariableReference { id: Identifier { name: \"name\" } }))] }), attributes: [], comment: None }))\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"multiline-message\" }, value: Some(Pattern { elements: [TextElement(\"Hello this is\\n\"), TextElement(\"a multiline message\\n\"), TextElement(\"using fluent.\")] }), attributes: [], comment: None }))\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"multiline-message-selector\" }, value: Some(Pattern { elements: [Placeable(SelectExpression { selector: VariableReference { id: Identifier { name: \"size\" } }, variants: [Variant { key: Identifier { name: \"big\" }, value: Pattern { elements: [TextElement(\"Big\")] }, default: false }, Variant { key: Identifier { name: \"medium\" }, value: Pattern { elements: [TextElement(\"Medium\")] }, default: true }, Variant { key: Identifier { name: \"small\" }, value: Pattern { elements: [TextElement(\"Small\")] }, default: false }] })] }), attributes: [], comment: None }))\n```\n\nTo reproduce the issue, ensure that the `test.ftl` is saved as CRLF. On unix, by default it is LF.\n\nThe expected output when the error occurs is the following:\n\n```txt\nContents of test.ftl:\n\nsimple-message = Hello\nmultiline-message = Hello this is\n    a multiline message\n    using fluent.\nmultiline-message-selector = { $size -\u003e\n        [big] Big\n        *[medium] Medium\n        [small] Small\n    }\nsimple-arg = Hello {$name}\n\nThe following errors occurred while parsing test.ftl:\n[ParserError { pos: (142, 143), slice: Some((103, 219)), kind: ExpectedToken('\\n') }]\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"simple-message\" }, value: Some(Pattern { elements: [TextElement(\"Hello\")] }), attributes: [], comment: None }))\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"simple-arg\" }, value: Some(Pattern { elements: [TextElement(\"Hello \"), Placeable(InlineExpression(VariableReference { id: Identifier { name: \"name\" } }))] }), attributes: [], comment: None }))\nSuccessfully found entry: Entry(Message(Message { id: Identifier { name: \"multiline-message\" }, value: Some(Pattern { elements: [TextElement(\"Hello this is\"), TextElement(\"\\n\"), TextElement(\"a multiline message\"), TextElement(\"\\n\"), TextElement(\"using fluent.\")] }), attributes: [], comment: None }))\nError: Could not find entry matching id `multiline-message-selector`\n```\n\nAs you can see, it managed to find all the entries, except the `multiline-message-selector`, which had earlier triggered a `ParseError`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellpossible%2Ffluent-multiline-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkellpossible%2Ffluent-multiline-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellpossible%2Ffluent-multiline-bug/lists"}