orangeshark / guile-commonmark Goto Github PK
View Code? Open in Web Editor NEWImplementation of CommonMark for Guile
License: GNU Lesser General Public License v3.0
Implementation of CommonMark for Guile
License: GNU Lesser General Public License v3.0
I am having issues with lists with guile-commonmark built from current master. The following occurs
(import (commonmark sxml))
(commonmark->sxml "* a list
error")
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure cdr: Wrong type argument in position 1 (expecting pair): "a list"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
This is the current master built against guile-3.0.4 on ubuntu linux 20.04.
I will try to look into what is going on, but I am not sure when I have the time. The markdown I am trying to parse produces the correct result over at https://spec.commonmark.org/dingus/
best regards
Linus Björnstam
This is similar to issue #13
On Ubuntu 20.04 (freshly installed)
I have installed guile-3.0 and guile-3.0-dev
Indicating the GUILE variable on the command line to configure doesn't suffice
This is what I get
$ ./configure --prefix=$HOME/opt GUILE=/usr/bin/guile
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: checking for guile 2.2
configure: checking for guile 2.0
configure: error:
No Guile development packages were found.
Please verify that you have Guile installed. If you installed Guile
from a binary distribution, please verify that you have also installed
the development packages. If you installed it yourself, you might need
to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more.
There is a compilation warning:
commonmark/node.scm:342:44: warning: possibly unbound variable `<>'
fold-node
procedure doesn't look correct to me (although I don't
understand it at all :-)).
Or was it mistakenly added by commit d214418?
(as it is not used by any other procedure)
Hi,
when do you plan to make a new release?
There were a couple of build-system related commits since 0.1.2 which look useful.
cheers,
ng0
Hello!
In 0.1.1, guile.am
contains:
moddir=$(datadir)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
It should instead be:
moddir=$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
Thanks,
Ludo'.
Hello @OrangeShark!
When building version 0.1 with Guile 2.2.4, we get these test failures:
FAIL: tests/blocks/link-reference-definitions
=============================================
%%%% Starting test blocks link-reference-definitions (Writing full log to "blocks link-reference-definitions.log")
tests/blocks/link-reference-definitions.scm:128: FAIL parse-blocks, link reference definition several can occur one after another
# of expected passes 11
# of unexpected failures 1
FAIL tests/blocks/link-reference-definitions.scm (exit status: 1)
FAIL: tests/inlines/links
=========================
%%%% Starting test inlines links (Writing full log to "inlines links.log")
;;; (fail (document ((closed . #f)) (paragraph ((closed . #f)) (link ((destination . "foo\nbar") (title . #f)) (text ((closed . #t)) "link")))) #f)
tests/inlines/links.scm:99: FAIL parse-inlines, link the destination cannot contain line breaks, even if enclosed in
pointy brackets
;;; (fail (document ((closed . #f)) (paragraph ((closed . #f)) (link ((destination . "<foo\nbar>") (title . #f)) (text ((closed . #t)) "link")))) #f)
tests/inlines/links.scm:111: FAIL parse-inlines, link the destination cannot contain line breaks, even if enclosed in
pointy brackets
tests/inlines/links.scm:311: FAIL parse-inlines, link whitespace is allowed around the destination and title
;;; (fail (document ((closed . #f)) (paragraph ((closed . #f)) (text ((closed . #t)) "\">") (link ((destination . "baz") (title . #f)) (text ((closed . #t)) "bar attr=\"") (text ((closed . #t)) "<") (text ((closed . #t)) "foo ")))) #f)
;;; (fail (document ((link-references ("ref" "/uri" #f))) (paragraph ((closed . #f)) (text ((closed . #t)) "\">") (link ((destination . "/uri") (title . #f)) (text ((closed . #t)) "bar attr=\"") (text ((closed . #t)) "<") (text ((closed . #t)) "foo ")))) #f)
# of expected passes 73
# of expected failures 2
# of unexpected failures 3
FAIL tests/inlines/links.scm (exit status: 1)
Looking at the commit log, it seems that they might be fixed in master
. Do you think a 0.2 release should be tagged?
Thank you,
Ludo'.
Hello, I see that you hardcode 2.0
for the Guile dirs in
Makefile.am
. This is not good, as if guile-commonmark will be
compiled with Guile 2.2, for example, .scm/.go files will still be put
in 2.0 dir.
I suggest to put the following lines in configure.ac
before
GUILE_PROGS (this will add a dependency on pkg-config
):
PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.11])
GUILE_PKG
And then you can use $(GUILE_EFFECTIVE_VERSION)
instead of 2.0
in
Makefile.am
, WDYT?
For more info, look at the Guile manual:
(info "(guile) Autoconf Macros")
And thanks for this great project!
markdown-toc allows to generate a table of content of a given markdown document.
Right now, using it with guile-commonmark fails for two reasons:
[toc item](#fragment-link)
, but guile-commonmark doesn't generate ids for header items so the links don't work.Here is an example markdown document using markdown-toc and how it is currently rendered.
Hi I am getting the dependency errors when trying to install guile-commonmark:
configure: found guile 2.0
checking for guile-2.0... /usr/bin/guile-2.0
checking for Guile version >= 2.0... 2.0.11
checking for guild-2.0... no
checking for guile-config-2.0... no
checking for guile-tools-2.0... no
configure: error: 'guild' binary not found; please check your guile-2.x installation.
I have guile-2.0, guile-2.0-dev installed
When I use guile 2.0.11 it works, but guile 2.0.9 fails make check
, here's the log if you're interested:
http://dpaste.com/3H3NAKA
The CommonMark Spec recognizes HTML blocks, i.e. "a group of lines that is treated as raw HTML (and will not be escaped in HTML output)." See http://spec.commonmark.org/0.26/#html-blocks.
Guile-commonmark does not seem to support these kinds of blocks.
When I try to render the following:
# Foo
- héllo
- bar
-
It fails on the last element with the following backtrace:
In commonmark/sxml.scm:
34:38 5 (_ (list ((type . bullet) (tight . #t) (bullet . #)) ?) #)
88:25 4 (list-node->sxml _)
In srfi/srfi-1.scm:
466:18 3 (fold1 () ((item ((padding . 2))) (item ((# . #) ?) ?) ?))
In commonmark/sxml.scm:
160:34 2 (_ (item ((padding . 2))) ())
95:30 1 (tight-item-node->sxml (item ((padding . 2))))
In commonmark/node.scm:
317:2 0 (last-child _)
It would be nicer if there was no errors.
Hello,
Where could I get scripts/gcmark.in
?
natsu@magnolia ~/src/guile-commonmark [env]$ ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /gnu/store/1ppqh79pkzxn0y945dcxmvp1y2fpd8iv-autoconf-2.69/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:6: installing 'build-aux/install-sh'
configure.ac:6: installing 'build-aux/missing'
configure.ac:13: error: required file 'scripts/gcmark.in' not found
autoreconf: automake failed with exit status: 1
Hi Erik,
as I already wrote to you in an email, I am opening a ticket here so this can be publicly reviewed
I wrote to you that I didn't know how to attach a file to a ticket here on Github but now I see how, so I'm attaching it here too
This is on Xubuntu 18.04.1 LTS and Guile 2.2.3
Thanks
Hi!
I've compiled from master branch and guile 3.0.1, each time the parser encounters a list it fails at the list cleaning stage with an error, here is the stack trace:
In ice-9/eval.scm:
159:9 4 (_ #(#(#<directory (haunt reader commonmark) 558c8e…>) …))
In commonmark/sxml.scm:
33:35 3 (commonmark->sxml _)
In commonmark/blocks.scm:
308:21 2 (clean-list-nodes (text ((closed . #t)) "`pagination…") #)
306:21 1 (any-blank-nodes? "node text")
In commonmark/node.scm:
113:2 0 (node-children "node text")
For now I have commented this line, and it is enough to continue building my site 🙂 but I think it is worth having a look at this issue.
Unfortunately I am not experienced with Guile and guile-commonmark codebase but I would be happy to test any fixes or pair to fix this issue 🙂
On Fedora 28 x86_64 there are 2 versions of Guile
Guile 2.0.14
and
Guile 2.2.2
Guile 2.0.14 is in /usr/bin/guile
Guile 2.2.2 is in /usr/bin/guile2.2
this is what happens
...
configure: checking for guile 2.2
configure: found guile 2.2
checking for guile... /usr/bin/guile
configure: error: found development files for Guile 2.2, but /usr/bin/guile has effective version 2.0
I'm afraid of removing guile 2.0.14 because it seems that an awful lot of stuff depends on it
How can I build guile-commonmark against guile 2.2.2 ?
On the autoconf mailing list I have been suggested a way to instruct the build system about how to use guile 2.2.2 and that works, but then /usr/bin/guild gets checked and I wonder if that is correct
They explicitly invited you to oin the thread in case you want some assistance with this, it's here
Also, why does guile gets checked 2 times ?
This is what happens with
./configure GUILE=/usr/bin/guile2.2 --prefix=$HOME/opt
configure: checking for guile 2.2
configure: found guile 2.2
checking for guile... /usr/bin/guile2.2
checking for Guile version >= 2.0.11... 2.2.2
checking for guild... /usr/bin/guild
checking for guile-config... no
The configure.ac does not explicitly permit building with Guile 3. It's as simple as replacing GUILE_PKG([2.2 2.0])
in configure.ac
with GUILE_PKG([3.0 2.2 2.0])
.
It would be great if guile-commonmark optionally supported smart punctuation: converting "straight quotes" to “curly quotes”, -- and --- to – and — (en-dash and em-dash), ... to … (ellipses).
References:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.