summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Peveler <matt.peveler@gmail.com>2020-03-11 17:22:05 -0700
committerMatthew Peveler <matt.peveler@gmail.com>2020-03-11 17:22:05 -0700
commit2d5f1aaf2ba0b2662fcf8e03cb8baa818365447c (patch)
tree767fb2c1f543740d7dad0373b0d18c5e5d721875
parent918d28042fb3f8e02abeb6ca95324ebd5fe81550 (diff)
downloadasciidoc-git-2d5f1aaf2ba0b2662fcf8e03cb8baa818365447c.tar.gz
add unwraplatex.py to Makefile for installation
Closes #98 Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
-rw-r--r--Makefile.in7
-rwxr-xr-xfilters/unwraplatex.py10
2 files changed, 13 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 9e26d7e..0090e94 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -65,6 +65,9 @@ latexfilterdir = $(filtersdir)/latex
latexfilterconf = filters/latex/latex-filter.conf
latexfilterconfdir = $(filtersdir)/latex
+unwraplatexfilter = filters/unwraplatex.py
+unwraplatexfilterdir = $(filtersdir)
+
themesdir = $(ASCIIDOCCONF)/themes
flasktheme = themes/flask/flask.css
@@ -93,8 +96,8 @@ iconsdir = $(ASCIIDOCCONF)/images/icons
doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) $(wildcard CHANGELOG*)
-DATATARGETS = manp conf docbook dblatex css js callouts icons codefilterconf musicfilterconf sourcefilterconf graphvizfilterconf latexfilterconf flasktheme volnitskytheme
-PROGTARGETS = prog codefilter musicfilter graphvizfilter latexfilter
+DATATARGETS = manp conf docbook dblatex css js callouts icons codefilterconf graphvizfilterconf latexfilterconf musicfilterconf sourcefilterconf flasktheme volnitskytheme
+PROGTARGETS = prog codefilter graphvizfilter latexfilter musicfilter unwraplatexfilter
TARGETS = $(DATATARGETS) $(PROGTARGETS) doc
INSTDIRS = $(TARGETS:%=%dir)
diff --git a/filters/unwraplatex.py b/filters/unwraplatex.py
index f832db8..57c84cf 100755
--- a/filters/unwraplatex.py
+++ b/filters/unwraplatex.py
@@ -11,8 +11,14 @@ DESCRIPTION
surrounding \[ and \] delimiters.
'''
-import re, sys
+import re
+import sys
-sys.stdout.write(re.sub("(?s)\A(?:\\\\\[\s*)?(.*?)(?:\\\\\])?\Z", "\\1", sys.stdin.read().rstrip()))
+sys.stdout.write(
+ re.sub(
+ "(?s)\A(?:\\\\\[\s*)?(.*?)(?:\\\\\])?\Z", "\\1",
+ sys.stdin.read().rstrip()
+ )
+)
# NOTE append endline in result to prevent 'no output from filter' warning
sys.stdout.write("\n")