From c80c3709637dc600fc3d74877cd3ea9ca1461a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sun, 3 Nov 2024 10:51:51 +0100 Subject: [PATCH 1/2] Fix 915. Generate quote instead of verbatim. --- src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index f04c8699..726cdef4 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -330,11 +330,18 @@ MicLaTeXWriter >> visitParagraph: aParagraph [ { #category : 'blocks' } MicLaTeXWriter >> visitQuote: aQuote [ - canvas environment + "canvas environment name: 'verbatim'; with: [ aQuote children do: [ :child | self visit: child. - canvas newLine ] ] + canvas newLine ] ]" + + + canvas newLine. + canvas environment + name: 'quote'; + with: [ aQuote children do: [ :each | each accept: self ] ]. + ] { #category : 'blocks - inline' } From b70b921461a6120b67bd39e0606e15c2848c2f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sun, 3 Nov 2024 16:50:09 +0100 Subject: [PATCH 2/2] Fixing all tests --- .../MicAbstractLaTexWriterTest.class.st | 4 ++-- src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st index 639c8be9..f5aafd3d 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st @@ -451,9 +451,9 @@ MicAbstractLaTexWriterTest >> testParagraphWithNested [ { #category : 'tests' } MicAbstractLaTexWriterTest >> testQuote [ - self parse: factory quoteSample andCheckWeGet: '\begin{verbatim}', newLine , + self parse: factory quoteSample andCheckWeGet: newLine, '\begin{quote}', newLine , 'Foo', newLine , - '\end{verbatim}', newLine + '\end{quote}', newLine ] { #category : 'tests - figure/link' } diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index 726cdef4..a124a611 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -340,7 +340,9 @@ MicLaTeXWriter >> visitQuote: aQuote [ canvas newLine. canvas environment name: 'quote'; - with: [ aQuote children do: [ :each | each accept: self ] ]. + with: [ + aQuote children do: [ :each | each accept: self ]. + canvas newLine.]. ]