forked from lix-project/lix
Use latest lowdown
This improves list rendering (https://github.com/kristapsdz/lowdown/issues/73).
This commit is contained in:
parent
58856e86f6
commit
aedbc7b683
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
description = "The purely functional package manager";
|
description = "The purely functional package manager";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "nixpkgs/nixos-21.05-small";
|
inputs.nixpkgs.url = "nixpkgs/nixos-21.05-small";
|
||||||
inputs.lowdown-src = { url = "github:kristapsdz/lowdown/VERSION_0_8_6"; flake = false; };
|
inputs.lowdown-src = { url = "github:kristapsdz/lowdown"; flake = false; };
|
||||||
|
|
||||||
outputs = { self, nixpkgs, lowdown-src }:
|
outputs = { self, nixpkgs, lowdown-src }:
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
lowdown = with final; stdenv.mkDerivation rec {
|
lowdown = with final; stdenv.mkDerivation rec {
|
||||||
name = "lowdown-0.8.6";
|
name = "lowdown-0.9.0";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
|
@ -25,7 +25,7 @@ std::string renderMarkdownToTerminal(std::string_view markdown)
|
||||||
Finally freeDoc([&]() { lowdown_doc_free(doc); });
|
Finally freeDoc([&]() { lowdown_doc_free(doc); });
|
||||||
|
|
||||||
size_t maxn = 0;
|
size_t maxn = 0;
|
||||||
auto node = lowdown_doc_parse(doc, &maxn, markdown.data(), markdown.size());
|
auto node = lowdown_doc_parse(doc, &maxn, markdown.data(), markdown.size(), nullptr);
|
||||||
if (!node)
|
if (!node)
|
||||||
throw Error("cannot parse Markdown document");
|
throw Error("cannot parse Markdown document");
|
||||||
Finally freeNode([&]() { lowdown_node_free(node); });
|
Finally freeNode([&]() { lowdown_node_free(node); });
|
||||||
|
@ -40,7 +40,7 @@ std::string renderMarkdownToTerminal(std::string_view markdown)
|
||||||
throw Error("cannot allocate Markdown output buffer");
|
throw Error("cannot allocate Markdown output buffer");
|
||||||
Finally freeBuffer([&]() { lowdown_buf_free(buf); });
|
Finally freeBuffer([&]() { lowdown_buf_free(buf); });
|
||||||
|
|
||||||
int rndr_res = lowdown_term_rndr(buf, nullptr, renderer, node);
|
int rndr_res = lowdown_term_rndr(buf, renderer, node);
|
||||||
if (!rndr_res)
|
if (!rndr_res)
|
||||||
throw Error("allocation error while rendering Markdown");
|
throw Error("allocation error while rendering Markdown");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue