summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Diemer <git@jensdiemer.de>2022-08-20 23:39:46 +0200
committerGitHub <noreply@github.com>2022-08-20 23:39:46 +0200
commit66340e67f7fee7be0fcd8249d60c676476b31be9 (patch)
tree88ab1b7f9c2c6c3616c69269e29e85ac5d35d1ce
parent9b19b94427b856c4077e7923ebfe08854c66285c (diff)
parent16e169454006ea4f898ec7b0b3e09b681b75ac04 (diff)
downloadcreole-66340e67f7fee7be0fcd8249d60c676476b31be9.tar.gz
Merge pull request #68 from jedie/dev
Dev
-rw-r--r--Makefile2
-rw-r--r--README.creole15
-rw-r--r--README.md18
-rw-r--r--README.rst22
-rw-r--r--creole/__init__.py2
-rw-r--r--creole/emitter/html2markdown_emitter.py3
-rw-r--r--creole/tests/test_cross_compare_markdown.py22
-rw-r--r--pyproject.toml2
8 files changed, 22 insertions, 64 deletions
diff --git a/Makefile b/Makefile
index 1400ae6..cf3e4a7 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ tox: check-poetry ## Run pytest via tox with all environments
pytest: check-poetry ## Run pytest
poetry run pytest
-update-readmes: ## update README.rst from README.creole
+update-readmes: ## update README.rst and README.md from README.creole
poetry run update_rst_readme
poetry run update_markdown_readme
diff --git a/README.creole b/README.creole
index d001f97..c2b5e90 100644
--- a/README.creole
+++ b/README.creole
@@ -34,15 +34,6 @@ Python packages available on: [[http://pypi.python.org/pypi/python-creole/]]
To setup a virtualenv via Poetry, see {{{unittests}}} section below.
-== dependencies ==
-
-For the most parts ({{{creole2html}}} and {{{html2creole}}}) no external libraries are needed.
-
-For all functionality (and running the unittests) these modules are needed:
-
-* [[http://pypi.python.org/pypi/docutils/|docutils]] (for the ReStructuredText stuff)
-* [[http://pypi.python.org/pypi/textile/|textile]] (for html2textile tests)
-
= example =
@@ -216,7 +207,7 @@ fix-code-style Fix code formatting
tox-listenvs List all tox test environments
tox Run pytest via tox with all environments
pytest Run pytest
-update-readmes update README.rst from README.creole
+update-readmes update README.rst and README.md from README.creole
publish Release new version to PyPi
}}}
@@ -230,9 +221,9 @@ Note: In this case you must install **docutils**! See above.
= history =
-* [[https://github.com/jedie/python-creole/compare/v1.5.0...master|*dev*]]
+* [[https://github.com/jedie/python-creole/compare/v1.5.0.rc1...master|*dev*]]
** TBC
-* [[https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0|v1.5.0 - 2022-08-20]]
+* [[https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0.rc1|v1.5.0.rc1 - 2022-08-20]]
** NEW: html2markdown
** creole2html bugfixes:
*** replace wrong {{{<tt>}}} with {{{<code>}}}
diff --git a/README.md b/README.md
index 55f6c2b..1401102 100644
--- a/README.md
+++ b/README.md
@@ -34,16 +34,6 @@ Python packages available on: [http://pypi.python.org/pypi/python-creole/](http:
```
To setup a virtualenv via Poetry, see `unittests` section below.
-## dependencies
-
-For the most parts (`creole2html` and `html2creole`) no external libraries are needed.
-
-For all functionality (and running the unittests) these modules are needed:
-
-
-* [docutils](http://pypi.python.org/pypi/docutils/) (for the ReStructuredText stuff)
-* [textile](http://pypi.python.org/pypi/textile/) (for html2textile tests)
-
# example
## creole2html
@@ -223,7 +213,7 @@ fix-code-style Fix code formatting
tox-listenvs List all tox test environments
tox Run pytest via tox with all environments
pytest Run pytest
-update-readmes update README.rst from README.creole
+update-readmes update README.rst and README.md from README.creole
publish Release new version to PyPi
```
## Use creole in README
@@ -236,9 +226,9 @@ Note: In this case you must install **docutils**! See above.
# history
-* [*dev*](https://github.com/jedie/python-creole/compare/v1.5.0...master)
+* [*dev*](https://github.com/jedie/python-creole/compare/v1.5.0.rc1...master)
* TBC
-* [v1.5.0 - 2022-08-20](https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0)
+* [v1.5.0.rc1 - 2022-08-20](https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0.rc1)
* NEW: html2markdown
* creole2html bugfixes:
* replace wrong `<tt>` with `<code>`
@@ -448,4 +438,4 @@ first source code was written 27.11.2008: [Forum thread (de)](http://www.python-
------------
-``Note: this file is generated from README.creole 2022-08-20 22:35:17 with "python-creole"`` \ No newline at end of file
+``Note: this file is generated from README.creole 2022-08-20 23:21:34 with "python-creole"`` \ No newline at end of file
diff --git a/README.rst b/README.rst
index d48f1c9..ae02a55 100644
--- a/README.rst
+++ b/README.rst
@@ -55,18 +55,6 @@ Python packages available on: `http://pypi.python.org/pypi/python-creole/ <http:
To setup a virtualenv via Poetry, see ``unittests`` section below.
-------------
-dependencies
-------------
-
-For the most parts (``creole2html`` and ``html2creole``) no external libraries are needed.
-
-For all functionality (and running the unittests) these modules are needed:
-
-* `docutils <http://pypi.python.org/pypi/docutils/>`_ (for the ReStructuredText stuff)
-
-* `textile <http://pypi.python.org/pypi/textile/>`_ (for html2textile tests)
-
=======
example
=======
@@ -99,7 +87,7 @@ Convert html code back into creole markup:
rest2html
---------
-Convert ReStructuredText into clean html code (needs `docutils`_):
+Convert ReStructuredText into clean html code (needs `docutils <http://pypi.python.org/pypi/docutils/>`_):
::
@@ -287,7 +275,7 @@ To see all make targets, just call ``make``:
tox-listenvs List all tox test environments
tox Run pytest via tox with all environments
pytest Run pytest
- update-readmes update README.rst from README.creole
+ update-readmes update README.rst and README.md from README.creole
publish Release new version to PyPi
--------------------
@@ -303,11 +291,11 @@ Note: In this case you must install **docutils**! See above.
history
=======
-* `*dev* <https://github.com/jedie/python-creole/compare/v1.5.0...master>`_
+* `*dev* <https://github.com/jedie/python-creole/compare/v1.5.0.rc1...master>`_
* TBC
-* `v1.5.0 - 2022-08-20 <https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0>`_
+* `v1.5.0.rc1 - 2022-08-20 <https://github.com/jedie/python-creole/compare/v1.4.10...v1.5.0.rc1>`_
* NEW: html2markdown
@@ -722,4 +710,4 @@ donation
------------
-``Note: this file is generated from README.creole 2022-08-20 22:35:17 with "python-creole"`` \ No newline at end of file
+``Note: this file is generated from README.creole 2022-08-20 23:21:34 with "python-creole"`` \ No newline at end of file
diff --git a/creole/__init__.py b/creole/__init__.py
index a7e56d1..f7e9207 100644
--- a/creole/__init__.py
+++ b/creole/__init__.py
@@ -24,7 +24,7 @@ from creole.parser.creol2html_parser import CreoleParser
from creole.parser.html_parser import HtmlParser
-__version__ = "1.5.0.rc0"
+__version__ = "1.5.0.rc1"
__api__ = "1.0" # Creole 1.0 spec - http://wikicreole.org/
VERSION_STRING = __version__ # remove in future
diff --git a/creole/emitter/html2markdown_emitter.py b/creole/emitter/html2markdown_emitter.py
index 83f4ede..866e090 100644
--- a/creole/emitter/html2markdown_emitter.py
+++ b/creole/emitter/html2markdown_emitter.py
@@ -105,8 +105,7 @@ class MarkdownEmitter(BaseEmitter):
def i_emit(self, node: DocNode):
return self._typeface(node, key='_')
- def em_emit(self, node: DocNode):
- return self._typeface(node, key='*')
+ em_emit = i_emit
def tt_emit(self, node: DocNode):
return self._typeface(node, key='##')
diff --git a/creole/tests/test_cross_compare_markdown.py b/creole/tests/test_cross_compare_markdown.py
index 2e77a81..181e36d 100644
--- a/creole/tests/test_cross_compare_markdown.py
+++ b/creole/tests/test_cross_compare_markdown.py
@@ -84,13 +84,17 @@ class CrossCompareMarkdownTests(BaseCreoleTest):
def test_typeface_basic(self):
self.cross_compare_markdown(
- markdown_string='*single asterisks*',
- html_string='<p><em>single asterisks</em></p>',
+ markdown_string='_emphasis_',
+ html_string='<p><em>emphasis</em></p>',
)
self.cross_compare_markdown(
markdown_string='**double asterisks**',
html_string='<p><strong>double asterisks</strong></p>',
)
+ self.cross_compare_markdown(
+ markdown_string='This is **markdown _markup_**!',
+ html_string='<p>This is <strong>markdown <em>markup</em></strong>!</p>',
+ )
def test_inline_code(self):
self.cross_compare_markdown(
@@ -104,20 +108,6 @@ class CrossCompareMarkdownTests(BaseCreoleTest):
debug=True,
)
- # self.cross_compare_markdown(
- # markdown_string=cleandoc(
- # '''
- # This is: _italic_, **bold**, `monospace`.
- # '''
- # ),
- # html_string=cleandoc(
- # '''
- # <p>This is: <em>italic</em>, <strong>bold</strong>, <code>monospace</code>.</p>
- # '''
- # ),
- # debug=True,
- # )
-
def test_lists(self):
self.cross_compare_markdown(
markdown_string=cleandoc(
diff --git a/pyproject.toml b/pyproject.toml
index efef02c..f6a78f6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "python-creole"
-version = "1.5.0.rc0"
+version = "1.5.0.rc1"
description = "python-creole is an open-source (GPL) markup converter in pure Python for: creole2html, html2creole, html2ReSt, html2textile"
# Will be generated from README.creole with: "poetry run update_rst_readme"