aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deb/Makefile5
-rwxr-xr-xdeb/make_deb.sh (renamed from make_deb.sh)7
-rw-r--r--deb/stack.yaml4
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs7
-rw-r--r--stack.hsb2hs.yaml2
5 files changed, 15 insertions, 10 deletions
diff --git a/deb/Makefile b/deb/Makefile
index 0c4262fc0..7310dc0bd 100644
--- a/deb/Makefile
+++ b/deb/Makefile
@@ -1,11 +1,12 @@
-COMMIT?=HEAD
+TREE?=HEAD
+DEBPKGVER?=1
VAGRANTBOX?=debian/wheezy64
.PHONY: package clean
package:
VAGRANTBOX=$(VAGRANTBOX) vagrant up
- vagrant ssh -c 'rm -rf pandoc && git clone https://github.com/jgm/pandoc && cd pandoc && git checkout -b work $(COMMIT) && git submodule update --init && ./make_deb.sh && cp *.deb /vagrant_data/'
+ vagrant ssh -c 'DEBPKGVER=$(DEBPKGVER) rm -rf pandoc && git clone https://github.com/jgm/pandoc && cd pandoc && git checkout -b work $(TREE) && git submodule update --init && sh -ev ./deb/make_deb.sh && cp *.deb /vagrant_data/'
vagrant halt
clean:
diff --git a/make_deb.sh b/deb/make_deb.sh
index 9b7960805..08d102ece 100755
--- a/make_deb.sh
+++ b/deb/make_deb.sh
@@ -9,7 +9,7 @@ esac
LOCAL=$HOME/.local
VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
-DEBPKGVER=1
+DEBPKGVER=${DEBPKGVER:-1}
DEBVER=$VERSION-$DEBPKGVER
BASE=pandoc-$DEBVER-$ARCHITECTURE
DIST=`pwd`/$BASE
@@ -21,11 +21,10 @@ TEMPDIR=make_binary_package.tmp.$$
# We need this for hsb2hs:
PATH=$LOCAL/bin:$PATH
-stack setup
stack clean
-which hsb2hs || stack install --stack-yaml stack.hsb2hs.yaml
+which hsb2hs || stack install --install-ghc --stack-yaml stack.hsb2hs.yaml
-stack install --stack-yaml deb/stack.yaml
+stack install --install-ghc --stack-yaml deb/stack.yaml
make man/pandoc.1
# get pandoc-citeproc man page:
diff --git a/deb/stack.yaml b/deb/stack.yaml
index 3fd5581f2..3dcf97979 100644
--- a/deb/stack.yaml
+++ b/deb/stack.yaml
@@ -16,5 +16,5 @@ packages:
- 'https://hackage.haskell.org/package/pandoc-citeproc-0.9/pandoc-citeproc-0.9.tar.gz'
extra-deps:
- 'cmark-0.5.0'
-- 'pandoc-types-1.16'
-resolver: lts-3.20
+- 'pandoc-types-1.16.0.1'
+resolver: lts-4.0
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 7b1341af4..77c3a1016 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1452,11 +1452,16 @@ table = try $ do
caption <- case frontCaption of
Nothing -> option (return mempty) tableCaption
Just c -> return c
+ -- renormalize widths if greater than 100%:
+ let totalWidth = sum widths
+ let widths' = if totalWidth < 1
+ then widths
+ else map (/ totalWidth) widths
return $ do
caption' <- caption
heads' <- heads
lns' <- lns
- return $ B.table caption' (zip aligns widths) heads' lns'
+ return $ B.table caption' (zip aligns widths') heads' lns'
--
-- inline
diff --git a/stack.hsb2hs.yaml b/stack.hsb2hs.yaml
index 1703e778f..7dd7899f9 100644
--- a/stack.hsb2hs.yaml
+++ b/stack.hsb2hs.yaml
@@ -1,4 +1,4 @@
packages:
- 'https://hackage.haskell.org/package/preprocessor-tools-1.0.1/preprocessor-tools-1.0.1.tar.gz'
- 'https://hackage.haskell.org/package/hsb2hs-0.3.1/hsb2hs-0.3.1.tar.gz'
-resolver: lts-3.10
+resolver: lts-4.0