{"id":13850135,"url":"https://github.com/ChristophP/elm-mark","last_synced_at":"2025-07-12T21:33:10.547Z","repository":{"id":42985211,"uuid":"174882550","full_name":"ChristophP/elm-mark","owner":"ChristophP","description":"Search Term Highlighting for Elm Apps https://package.elm-lang.org/packages/ChristophP/elm-mark/latest/","archived":false,"fork":false,"pushed_at":"2022-12-11T07:38:06.000Z","size":549,"stargazers_count":8,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-14T03:02:00.831Z","etag":null,"topics":["elm-lang","mark","search-highlighting"],"latest_commit_sha":null,"homepage":"","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChristophP.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}},"created_at":"2019-03-10T21:21:52.000Z","updated_at":"2022-10-10T13:34:24.000Z","dependencies_parsed_at":"2023-01-26T18:16:29.371Z","dependency_job_id":null,"html_url":"https://github.com/ChristophP/elm-mark","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristophP%2Felm-mark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristophP%2Felm-mark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristophP%2Felm-mark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristophP%2Felm-mark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristophP","download_url":"https://codeload.github.com/ChristophP/elm-mark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225839485,"owners_count":17532305,"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":["elm-lang","mark","search-highlighting"],"created_at":"2024-08-04T20:00:59.794Z","updated_at":"2024-11-22T03:30:46.598Z","avatar_url":"https://github.com/ChristophP.png","language":"Elm","funding_links":[],"categories":["Elm"],"sub_categories":[],"readme":"# Elm Mark\n\nSearch Term Highlighting for Elm Apps\n\n![elm-mark-demo](https://raw.githubusercontent.com/ChristophP/elm-mark/master/elm-mark-demo.gif)\n\nCheck out the [demo](https://elm-mark-demo.deedop.de/).\n\n**Upgrade hint from version 1.x.x:**\nThere is only one easy-to-fix breaking change in version 2.\nThe exposed module name for `elm-mark` is changed from `Mark` to `String.Mark`.\nThis avoids module naming collisions with other popular packages. Now feel free\nto use both `elm-mark` with for example the great\n[`mdgriffith/elm-markup`](https://package.elm-lang.org/packages/mdgriffith/elm-markup/latest/). 🎉\n\n## Who's using it?\n\n- The amazing [`ThankU`](https://www.thanku.social) [(www.thanku.social)](https://www.thanku.social): the platform to say thank you and do good.\n- others: please open a PR to have your name or company added\n\n## Why do you need it?\n\nMarking keywords in text is harder than it sounds. I had to do it a couple of\ntimes and was amazed with the amount of code needed to do something so seemingly simple.\nThis package wraps everything you need, to do search term highlighting.\nI spent quite some time polishing the API to where it is right now, so I hope\nyou'll find it pleasant to use and highlight away. :-)\n\n## How to use\n\n```elm\nimport Html\nimport String.Mark as Mark\n\nmain = Html.p [] \u003c| Mark.mark \"ness\" \"Tennessee\"\n-- will render \u003cp\u003eTen\u003cmark\u003eness\u003c/mark\u003eee\u003c/p\u003e\n```\n\n## Options and Configuration\n\nThere are a bunch of options ranging from no-config to fully customizable.\nOptions include case sensitiviy, single word/multi word search and search term\nlength threshold. You can also provide your own custom search logic, should the\navailable options not meet your needs.\nHere's a small example of configuring case sensitivity.\n\n```elm\nlet\n  options = { defaultOptions | searchType = normalSearch matchCase }\nin Mark.markWith options \"a-search-term\" \"some text to search\"\n```\n\nCheck out the module documentation to see detailed info about the\nconfiguration options.\n\n## Examples\n\nCheck out the repository for `examples` and `tests`, there are also a few code\nexamples in the module documentation.\n\n## Developing\n\nDeveloping and running the tests.\n\n```\nnpm ci\nnpm run dev\n```\n## Credits\n\nThanks to [@layflags](https://github.com/layflags) and [@pehota](https://github.com/pehota) for inspirational thoughts 🤔, code reviews 👓 and\nlots of fun working on projects together. ❤\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChristophP%2Felm-mark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChristophP%2Felm-mark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChristophP%2Felm-mark/lists"}