CHANGELOG.md (2800B)
1 # Changelog 2 3 ### 1.1.0 - 2022-02-12 4 5 Require NimbleParsec `~> 1.2.2` onwards to prepare for future deprecations. 6 7 ### 1.0.5 - 2020-10-02 8 9 #### Bugfix #1 10 11 Fix serious bug in the `Makeup.Lexer.Combinators.lexeme/1` when given a list of unicode characters. 12 13 Before this fix, the following combinator: 14 15 ``` 16 import Makeup.Lexer.Combinators 17 18 characters_lexeme = 19 utf8_char([]) 20 |> utf8_char([]) 21 |> lexeme() 22 |> token(:character_lexeme) 23 ``` 24 25 when given as input a string like `"àó"` would return the following invalid Unicode: 26 27 ``` 28 [{:character_lexeme, %{}, <<225, 242>>}] 29 ``` 30 31 instead of 32 33 ``` 34 [{:character_lexeme, %{}, "áò"}] 35 ``` 36 37 This was caused by the use of `IO.iodata_to_binary/1` instead of (the slower) `to_string()`. This was a problem because `IO.iodata_to_binary/1` would put any byte in a binary instead of (correctly) encoding bytes > 128 as a Unicode character. This is not a problem with `IO.iodata_to_binary/1` it's a problem with using that function when we want to encode characters as Unicode strings. 38 39 #### Bugfix #2 40 41 Fixed an edge case in the HTML encoder in the formatter. 42 43 44 ### 1.0.4 - 2020-09-25 45 46 Fix warnings and update NimbleParsec dependency. 47 48 49 ### 1.0.3 - 2020-06-07 50 51 Allow styles to be given as atoms when generating stylesheets. 52 53 54 ### 1.0.2 - 2020-05-28 55 56 Update NimbleParsec dependency. 57 58 59 ### 1.0.1 - 2020-03-24 60 61 Remove warnings on recent Elixir versions. 62 63 64 ### 1.0.0 - 2019-07-15 65 66 Upgrade the HTML formatter so that you can use different kinds of tags around the tokens. 67 68 Previous versions always used the `<span>` tag (e.g. `<span class="n">name</span>`). 69 You can now use other HTML tags using the `:highlight_tag` option: 70 71 ```elixir 72 alias Makeup.Formatters.HTML.HTMLFormatter 73 HTMLFormatter.format_as_iolist(tokens, highlight_tag: "font") 74 ``` 75 76 77 ### 0.8.0 - 2019-01-01 78 79 This release adds a new file extension registry for lexers. 80 This means that it's now possible to lookup lexers by file extension. 81 Since the previous release it was already possible to lookup lexers by language name. 82 For example: 83 84 ```elixir 85 elixir_lexer = Makeup.Registry.fetch_lexer_by_extension!("elixir") 86 ``` 87 88 Now you can also do this this: 89 90 ```elixir 91 elixir_lexer = Makeup.Registry.get_lexer_by_extension!("ex") 92 ``` 93 94 Documentation of the registry functionality was also improved. 95 96 97 ### 0.7.0 - 2018-12-30 98 99 Adds a register where lexer developers can register their lexers. 100 This allows one to pick a lexer based on the language name. 101 102 The goal is for Makeup to be aware of the available lexers. 103 In a project such as ExDoc this allows Makeup to support an unbounded number of languages just by declaring the lexer as a dependency. 104 105 106 ### 0.6.0 - 2018-12-22 107 108 Fixes the combinators affected by compatibility breaks in `nimble_parsec` from `0.4.x` to `0.5.x`. 109 110 Pins `nimble_parsec` to version `0.5.0`.