Use the old converter for nwd file, not the markdown class

This commit is contained in:
Veronica K. B. Olsen
2021-02-06 17:19:30 +01:00
parent c677db70b4
commit b59b3a3a74
4 changed files with 36 additions and 39 deletions
+8 -5
View File
@@ -20,8 +20,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import os
import pytest
from tools import readFile
from nw.core import NWProject, NWDoc
from nw.core.tokenizer import Tokenizer
@@ -182,6 +185,11 @@ def testCoreToken_TextOps(monkeypatch, nwMinimal, dummyGUI):
theToken.doPostProcessing()
assert theToken.theResult == "This is text with escapes: ** ~~ __"
# Save File
savePath = os.path.join(nwMinimal, "dump.nwd")
theToken.saveRawMarkdown(savePath)
assert readFile(savePath) == "# Notes: Plot\n\n"
# END Test testCoreToken_TextOps
@pytest.mark.core
@@ -397,11 +405,6 @@ def testCoreToken_Tokenize(dummyGUI):
"Some **nested bold and _italic_ and ~~strikethrough~~ text** here\n\n"
)
# Check the markdown function as well
assert theToken.theMarkdown[-1] == (
"Some **nested bold and _italic_ and ~~strikethrough~~ text** here\n\n"
)
# END Test testCoreToken_Tokenize
@pytest.mark.core