--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm trying to find some substantial bits, but I will say that this not being aligned gives me the heebies for no good reason: https://github.com/pragdave/earmark/blob/master/lib/earmark/block.ex#L52
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stylistically it looks ok for the most part.One thing I would definitely change is extract the mix task from mix.exs. Mix.exs should only ever container your project definition, everything else is noise. The convention is to put mix tasks under lib/mix/tasks/.
If you need a general-purpose padding function to replace this https://github.com/pragdave/earmark/blob/d6b2481d1c573557236e0b3d153729f81fb4ae0e/lib/earmark/helpers.ex#L25-L28, you could use List.to_string(:io_lib.format('~*s', [indent_width, ' '])).
This one makes me cringe a bit: String.slice(str, ignore, 9999999), but it's Elixir's fault. It should have a special value for the argument to mean "until the end".
We had a discussion about this. This task is only for me (it generates README.md from module and function docs) and so it shouldn't be distributed with the main project.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We had a discussion about this. This task is only for me (it generates README.md from module and function docs) and so it shouldn't be distributed with the main project.
If you need a general-purpose padding function to replace this https://github.com/pragdave/earmark/blob/d6b2481d1c573557236e0b3d153729f81fb4ae0e/lib/earmark/helpers.ex#L25-L28, you could use List.to_string(:io_lib.format('~*s', [indent_width, ' '])).
Sure, but this is (presumably) a lot quicker :)
This one makes me cringe a bit: String.slice(str, ignore, 9999999), but it's Elixir's fault. It should have a special value for the argument to mean "until the end".Yeah, I know. I got a funny taste in my mouth when I wrote it :)
I fail to see the validity of "available only for me" argument. if you want to keep it only on your machine, it can be extracted into a separate project and installed as a local archive.$ mix helpAs it happens, this task is available to anyone who has cloned the project:We had a discussion about this. This task is only for me (it generates README.md from module and function docs) and so it shouldn't be distributed with the main project.
...
mix readme # Build README.md by including module docs
...
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
String.slice(str, ignore, byte_size(str)) or String.slice(str, ignore..-1).It is better than Listerine ;)
--
byte_size(str) is fast (O(1)), the other one will traverse the whole string to convert -1 into the proper offset. I have amended the docs of String.slice/2 to make this range property explicit.
byte_size(str) is fast (O(1)), the other one will traverse the whole string to convert -1 into the proper offset. I have amended the docs of String.slice/2 to make this range property explicit.But doesn't String.slice work on codepoints, and byte_size is bytes? So really it's not too different to using 99999?
--
--