diff --git a/src/Microdown-BookTester/MicAnchorResult.class.st b/src/Microdown-BookTester/MicAnchorResult.class.st index a4d6de7d..0db517c9 100644 --- a/src/Microdown-BookTester/MicAnchorResult.class.st +++ b/src/Microdown-BookTester/MicAnchorResult.class.st @@ -12,7 +12,7 @@ Class { { #category : 'kinds' } MicAnchorResult class >> errorType [ - ^ 'UndefinedAnchor' + ^ 'Anchor problem' ] { #category : 'accessing' } @@ -36,7 +36,7 @@ MicAnchorResult >> explanation [ { #category : 'accessing' } MicAnchorResult >> isWhat [ - ^ 'undefined' + ^ 'anchor problem' ] { #category : 'accessing' } diff --git a/src/Microdown-Evaluator/MicCompilationContext.class.st b/src/Microdown-Evaluator/MicCompilationContext.class.st index f9a45ffd..d2b757b8 100644 --- a/src/Microdown-Evaluator/MicCompilationContext.class.st +++ b/src/Microdown-Evaluator/MicCompilationContext.class.st @@ -14,11 +14,6 @@ MicCompilationContext class >> configuration: aConfiguration [ ^ self new configuration: aConfiguration ] -{ #category : 'instance creation' } -MicCompilationContext class >> isAbstract [ - ^ false -] - { #category : 'instance creation' } MicCompilationContext class >> withDocument: aDocument [ ^ self new diff --git a/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st index 703cd8ff..639c8be9 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicAbstractLaTexWriterTest.class.st @@ -12,7 +12,8 @@ Class { } { #category : 'asserting' } -MicAbstractLaTexWriterTest class >> shouldInheritSelectors [ +MicAbstractLaTexWriterTest class >> isAbstract [ + ^ true ] @@ -65,9 +66,10 @@ MicAbstractLaTexWriterTest >> factory: aFactory [ { #category : 'accessing' } MicAbstractLaTexWriterTest >> newLine: aNewLine [ - (aNewLine = String cr) ifTrue:[ writer crAsNewLine ]. - (aNewLine = String lf) ifTrue:[ writer lfAsNewLine ]. - (aNewLine = String crlf) ifTrue:[ writer crlfAsNewLine ]. + + aNewLine = String cr ifTrue: [ writer crAsNewLine ]. + aNewLine = String lf ifTrue: [ writer lfAsNewLine ]. + aNewLine = String crlf ifTrue: [ writer crlfAsNewLine ]. newLine := aNewLine ] @@ -689,8 +691,3 @@ MicAbstractLaTexWriterTest >> writeForElement: aNode [ writer visit: aNode. ] - -{ #category : 'accessing' } -MicAbstractLaTexWriterTest >> writer: aWriter [ - writer := aWriter new -] diff --git a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st index 70d90654..1a61fc8d 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st @@ -5,7 +5,19 @@ Class { #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : 'as yet unclassified' } +{ #category : 'asserting' } +MicLaTeXWriterTest class >> isAbstract [ + + ^ false +] + +{ #category : 'asserting' } +MicLaTeXWriterTest class >> shouldInheritSelectors [ + + ^ true +] + +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblock [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -14,7 +26,7 @@ MicLaTeXWriterTest >> testCodeblock [ '\end{listing}', newLine ] -{ #category : 'as yet unclassified' } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -23,7 +35,7 @@ MicLaTeXWriterTest >> testCodeblockWithCaption [ '\end{listing}', newLine ] -{ #category : 'as yet unclassified' } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -32,198 +44,16 @@ MicLaTeXWriterTest >> testCodeblockWithLabel [ '\end{listing}', newLine ] -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testCrAsNewLine [ - - writer crAsNewLine. - self assert: writer canvas stream configuration newLine equals: Character cr -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testCrlfAsNewLine [ - - writer crlfAsNewLine. - self assert: writer canvas stream configuration newLine equals: String crlf -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testFigure [ - - self writeFor: factory figureSample. - self assert: writer contents equals: newLine , - '\begin{figure}[htpb]', newLine , - '\begin{center}', newLine , - '\includegraphics[width=0.8\textwidth]{/anUrl}', newLine , - '\caption{Foo}\label{figureTest}', newLine , - '\end{center}', newLine , - '\end{figure}', newLine, newLine -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testFigureBold [ - self writeFor: factory figureBoldSample. - self assert: writer contents equals: newLine, - '\begin{figure}[htpb]', newLine , - '\begin{center}', newLine , - '\includegraphics[width=0.8\textwidth]{/anUrl}', newLine , - '\caption{\textbf{Foo}}\label{figureTest}', newLine , - '\end{center}', newLine , - '\end{figure}', newLine , newLine -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testFigureRealSample [ - - self writeFor: factory figureRealSample. - self assert: writer contents equals: newLine , -'\begin{figure}[htpb]', newLine , -'\begin{center}', newLine , -'\includegraphics[width=0.8\textwidth]{figures/logo.png}', newLine , -'\caption{A logo png under figures folder}\label{figureTest}', newLine , -'\end{center}', newLine , -'\end{figure}', newLine, newLine -. -self flag: #todo. -"may be we should get figures/logo.png when file://figures/logo.png" - -] - { #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigureWithEmptyCaption [ self writeFor: '![](figures/f.png)'. self - assert: writer contents + assert: writer contents equals: - newLine , '\begin{center}', newLine, '\includegraphics[width=1.0\textwidth]{figures/f.png}' - , '\end{center}', newLine, newLine -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testFootnote [ - - self parseInlined: factory footnoteSample andCheckWeGet: '\footnote{Pharo is cool}' - -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel1 [ - - self parse: factory headerLevel1Sample andCheckWeGet: newLine , '\part{Foo}' - -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel2 [ - - self parse: factory headerLevel2Sample andCheckWeGet: newLine , '\chapter{Foo}' -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel3 [ - - self parse: factory headerLevel3Sample andCheckWeGet: newLine , '\section{Foo}' -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel4 [ - - self parse: factory headerLevel4Sample andCheckWeGet: newLine , '\subsection{Foo}' -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel5 [ - - self parse: factory headerLevel5Sample andCheckWeGet: newLine , '\subsubsection{Foo}' -] - -{ #category : 'tests - header' } -MicLaTeXWriterTest >> testHeaderLevel6 [ - - self parse: factory headerLevel6Sample andCheckWeGet: newLine , '\paragraph{Foo}' -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testHorizontalLine [ - - self parseInlined: factory horizontalLineSample andCheckWeGet: '\rule{\textwidth}{0.1pt}' -] - -{ #category : 'tests - formats' } -MicLaTeXWriterTest >> testItalic [ - - self parseInlined: factory italicFormatSample andCheckWeGet: '\textit{Foo}' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testLfAsNewLine [ - - writer lfAsNewLine. - self assert: writer canvas stream configuration newLine equals: Character lf -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testLink [ - self writeFor: factory linkSample. - self assert: writer contents equals: newLine, -'\href{/anUrl}{Foo}', newLine -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testLinkBold [ - - self writeFor: factory linkBoldSample. - self assert: writer contents equals: newLine , - '\href{/anUrl}{\textbf{Foo}}', newLine -] - -{ #category : 'tests - math' } -MicLaTeXWriterTest >> testMathBloc [ - - self - parseInlined:'$$ -f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz -$$' - - andCheckWeGet: - -'\begin{equation}', newLine, -'f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz', newLine, -'\end{equation}' -] - -{ #category : 'tests - math' } -MicLaTeXWriterTest >> testMathBlocWithLabel [ - - self - parseInlined:'$$ % anchor=eq1 -f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz -$$' - - andCheckWeGet: - -'\begin{equation}', newLine, -'\label{eq1}', newLine, -'f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz', newLine, -'\end{equation}' -] - -{ #category : 'tests - math' } -MicLaTeXWriterTest >> testMathInLine [ - - self - parseInlined: 'Similarly, let $f_{w,C}$ be the number of documents in corpus $C$ that contain word $w$:' - - - andCheckWeGet: - -'Similarly, let $f_{w,C}$ be the number of documents in corpus $C$ that contain word $w$:' -] - -{ #category : 'tests - formats' } -MicLaTeXWriterTest >> testMonospace [ - - self parseInlined: factory monospaceFormatSample andCheckWeGet: '\code{Foo}' + newLine, '\begin{figure}[htpb]', newLine , '\begin{center}', newLine, '\includegraphics[width=1.0\textwidth]{figures/f.png}', newLine, '\caption{}', newLine, + '\end{center}', newLine, '\end{figure}', newLine, newLine + ] { #category : 'tests' } @@ -233,365 +63,8 @@ MicLaTeXWriterTest >> testNote [ ] -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testOrderedList [ - - self writeFor: factory orderedListWithTwoItemsSample. - self assert: writer contents equals: newLine, - '\begin{enumerate}', newLine , - ' \item first', newLine , - ' \item second', newLine , - '\end{enumerate}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testOrderedListBold [ - - self writeFor: factory orderedListWithTwoItemsBoldSample. - self assert: writer contents equals: newLine , - '\begin{enumerate}', newLine , - ' \item \textbf{first}', newLine , - ' \item second', newLine , - '\end{enumerate}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testOrderedListNested [ - - self writeFor: factory orderedListWithTwoItemsBoldFirstSample. - self assert: writer contents equals: newLine, - '\begin{enumerate}', newLine , - ' \item \textbf{\textit{first}}', newLine , - ' \item second', newLine , - '\end{enumerate}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testOrderedNestedListNested [ - - self writeFor: factory nestedOrderedListSample. - self assert: writer contents equals: newLine , - '\begin{itemize}', newLine , - ' \item Foo', newLine , - ' \item Bar', newLine , - ' \begin{enumerate}', newLine , - ' \item B', newLine , - ' \item a', newLine , - ' \item r', newLine , - ' \end{enumerate}', newLine , - '\end{itemize}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testOrderedNestedListNested2 [ - - self writeFor: factory nestedOrderedList2Sample. - self assert: writer contents equals: newLine , - '\begin{itemize}', newLine , - ' \item Foo', newLine , - ' \item Bar', newLine , - ' \begin{enumerate}', newLine , - ' \item B', newLine , - ' \item a', newLine , - ' \item r', newLine , - ' \begin{itemize}', newLine , - ' \item 3rdlvel', newLine , - ' \item 3rdlevl2', newLine , - ' \end{itemize}', newLine , - ' \end{enumerate}', newLine , - ' \item Zork', newLine , - '\end{itemize}', newLine -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraph [ - - self parse: factory paragraphSample andCheckWeGet: newLine, - 'Foo',newLine - -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraphLongWithAccents [ - - self parse: factory paragraphOnMultipleLinesSample andCheckWeGet: newLine, -'Je ne connais pas la peur, car la peur tue l''esprit. La peur est la petite mort qui conduit \`{a} l''oblit\''{e}ration totale. J''affonterai ma peur. Je lui permettrais de passer sur moi, au travers de moi. Et lorsqu''elle sera pass\''{e}e, je tournerai mon oeil interieur sur son chemin. Et l\`{a} o\`{u} elle sera pass\''{e}e, il n''y aura plus rien, rien que moi.', newLine -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraphWithBold [ - - self parse: factory paragraphBoldSample andCheckWeGet: newLine , - 'this is a \textbf{paragraph}', newLine -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraphWithItalic [ - - self parse: factory paragraphItalicSample andCheckWeGet: newLine , - 'this is a \textit{paragraph}', newLine -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraphWithMonospace [ - - self parse: factory paragraphMonospaceSample andCheckWeGet: newLine , -'this is a \code{paragraph}', newLine - -] - -{ #category : 'tests - paragraph' } -MicLaTeXWriterTest >> testParagraphWithNested [ - - self parse: factory paragraphNestedSample andCheckWeGet: newLine , -'this is a \textbf{\textit{paragraph}}', newLine -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testQuote [ - - self parse: factory quoteSample andCheckWeGet: '\begin{verbatim}', newLine , - 'Foo', newLine , - '\end{verbatim}', newLine -] - -{ #category : 'tests - figure/link' } -MicLaTeXWriterTest >> testRealLinkSample [ - self writeFor: factory realLinkSample. - self assert: writer contents equals: newLine , -'\href{http://www.pharo.org}{The Pharo Project}', newLine -] - -{ #category : 'tests - math' } -MicLaTeXWriterTest >> testSimpleMathBloc [ - - | root math | - root := parser parse: ' -$$ -f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz -$$'. - math := root children first. - self - parseInlined:'$$ -f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz -$$' - - andCheckWeGet: - -'\begin{equation}', newLine, -'f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz', newLine, -'\end{equation}' -] - -{ #category : 'tests - formats' } -MicLaTeXWriterTest >> testStrike [ - - self parseInlined: factory strikethroughFormatSample andCheckWeGet: '\sout{Foo}' - -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testTable [ - self writeFor: factory tableSample. - self assert: writer contents equals: newLine, - '\begin{tabular}{ll}', newLine , - '\toprule', newLine , - '\textbf{aaab} & \textbf{jkhjh} \\', newLine , - '\midrule', newLine , - 'bar & rab \\', newLine , - '\bottomrule', newLine , - '\end{tabular}', newLine -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testTableWhithoutHeader [ - - self writeFor: (factory simpleTableWithoutHeaderTable). - self assert: writer contents equals: newLine, - '\begin{tabular}{ll}', newLine , - '\toprule', newLine , - 'aaab & jkhjh \\', newLine , - 'bar & rab \\', newLine , - '\bottomrule', newLine , - '\end{tabular}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testUnorderedList [ - - self writeFor: factory unorderedListWithTwoItemsSample. - self assert: writer contents equals: newLine, - '\begin{itemize}', newLine , - ' \item Foo', newLine , - ' \item Bar', newLine , - '\end{itemize}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testUnorderedListBold [ - - self writeFor: factory unorderedListWithTwoItemsBoldSample. - self assert: writer contents equals: newLine , - '\begin{itemize}', newLine , - ' \item \textbf{Foo}', newLine , - ' \item Bar', newLine , - '\end{itemize}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testUnorderedListNested [ - - self writeFor: factory unorderedListWithTwoItemsNestedSample. - self assert: writer contents equals: newLine , - '\begin{itemize}', newLine , - ' \item \sout{\textit{Foo}}', newLine , - ' \item Bar', newLine , - '\end{itemize}', newLine -] - -{ #category : 'tests - lists' } -MicLaTeXWriterTest >> testUnorderedNestedListNested [ - - self writeFor: factory nestedUnorderedListSample. - self assert: writer contents equals: newLine , - '\begin{itemize}', newLine , - ' \item Foo', newLine , - ' \item Bar', newLine , - ' \begin{itemize}', newLine , - ' \item B', newLine , - ' \item a', newLine , - ' \item r', newLine , - ' \end{itemize}', newLine , - '\end{itemize}', newLine - -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> testUrlsAreProtected [ - - self assert: (writer protectUrl: '#') equals: '\#'. - self assert: (writer protectUrl: '~') equals: '~'. - self assert: (writer protectUrl: '&') equals: '&'. - self assert: (writer protectUrl: '%') equals: '\%'. - self assert: (writer protectUrl: '\') equals: '\\'. - self assert: (writer protectUrl: '\~#%') equals: '\\~\#\%'. -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCr [ - writer crAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self assert: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String cr , -'cela ne fonctionnerais pas', String cr, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsCrlf [ - writer crlfAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String cr , -'cela ne fonctionnerais pas', String cr, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsLf [ - writer lfAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String cr , -'cela ne fonctionnerais pas', String cr, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCrlf [ - writer crlfAsNewLine . - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self assert: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String crlf , -'cela ne fonctionnerais pas', String crlf, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsCr [ - writer crAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String crlf , -'cela ne fonctionnerais pas', String crlf, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsLf [ - writer lfAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String crlf , -'cela ne fonctionnerais pas', String crlf, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithLf [ - writer lfAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self assert: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String lf , -'cela ne fonctionnerais pas', String lf, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCr [ - writer crAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String lf , -'cela ne fonctionnerais pas', String lf, -'car il a etait fait pour cela' -] - -{ #category : 'tests - breaklining' } -MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCrlf [ - writer crlfAsNewLine. - writer canvas nextPutAllLines: 'Je ne vois pas pourquoi -cela ne fonctionnerais pas -car il a etait fait pour cela'. - self deny: writer canvas stream contents equals: 'Je ne vois pas pourquoi', String lf , -'cela ne fonctionnerais pas', String lf, -'car il a etait fait pour cela' -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> writeFor: aString [ - | mic | - mic := parser parse: aString. - writer visit: mic. - -] - -{ #category : 'tests' } -MicLaTeXWriterTest >> writeForElement: aNode [ - - writer visit: aNode. - -] - { #category : 'accessing' } -MicLaTeXWriterTest >> writer: aWriter [ - writer := aWriter new +MicLaTeXWriterTest >> writer: aWriterClass [ + + writer := aWriterClass new. ] diff --git a/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st b/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st index 1b52e3e8..f85b5c08 100644 --- a/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st +++ b/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st @@ -16,11 +16,6 @@ Class { #package : 'Microdown-LaTeXExporter' } -{ #category : 'visiting' } -MicLatexPathUpdateVisitor class >> isAbstract [ - ^ false -] - { #category : 'visiting' } MicLatexPathUpdateVisitor class >> key [ diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st index 0b140fb3..b4337082 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st @@ -40,7 +40,7 @@ styledTextFor: aString asFest'. "Check that the unknown variable 'blue' is not colored red" blueLocation := richText asString findString: 'blue'. textColor := (richText attributesAt: blueLocation) detect: [ :attr | attr class = TextColor ]. - self assert: textColor color red equals: 0. + self assert: textColor color red equals: 1.0. ] { #category : 'tests' } @@ -59,7 +59,7 @@ green isColored: yellow "Check that the unknown variable 'blue' is not colored red" blueLocation := richText asString findString: 'blue'. textColor := (richText attributesAt: blueLocation) detect: [ :attr | attr class = TextColor ]. - self assert: textColor color red equals: 0. + self assert: textColor color red equals: 1.0. ] { #category : 'tests' } diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st index 9a55c647..b62b0d1f 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st @@ -677,7 +677,7 @@ styledTextFor: aString asFest'. "Check that the unknown variable 'blue' is not colored red" blueLocation := richText asString findString: 'blue'. textColor := (richText attributesAt: blueLocation) detect: [ :attr | attr class = TextColor ]. - self assert: textColor color red equals: 0. + self assert: textColor color red equals: 1.0. ] { #category : 'tests - list' } diff --git a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st index eee75c7c..17898013 100644 --- a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st +++ b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st @@ -51,13 +51,6 @@ MicMicrodownSnippetFactory class >> buildDocument [ << (factory perform: elementTypeSelector) ] ] ] ] -{ #category : 'utilities' } -MicMicrodownSnippetFactory class >> protocolNames [ - "Return the list of all the protocol names included in this class." - - ^ self protocols collect: [ :protocol | protocol name ] -] - { #category : 'anchor' } MicMicrodownSnippetFactory >> anchorAreTrimedSample [ ^ AnchorMarkup, ' test ' diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index 62205251..4a48d8c3 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -30,18 +30,6 @@ MicFigureBlock class >> openingDelimiter [ ^ FigureNameOpenerMarkup ] -{ #category : 'testing' } -MicFigureBlock >> hasAnchor [ - - ^ self anchor isNotNil -] - -{ #category : 'testing' } -MicFigureBlock >> hasCaption [ - - ^ captionElements isNotNil -] - { #category : 'visiting' } MicFigureBlock >> accept: aVisitor [ ^ aVisitor visitFigure: self @@ -59,6 +47,12 @@ MicFigureBlock >> closeMe [ self children do: [ :each | each basicParent: self ]. ] +{ #category : 'testing' } +MicFigureBlock >> hasCaption [ + + ^ children isNotNil +] + { #category : 'printing' } MicFigureBlock >> plainText [ ^ '![', ((self children collect: #plainText) joinUsing: ' '), '](', url ,')' diff --git a/src/Microdown/MicInlineElement.class.st b/src/Microdown/MicInlineElement.class.st index dd7020e6..a311a10d 100644 --- a/src/Microdown/MicInlineElement.class.st +++ b/src/Microdown/MicInlineElement.class.st @@ -52,12 +52,6 @@ MicInlineElement >> closingDelimiter [ ^ self class closingDelimiter ] -{ #category : 'private' } -MicInlineElement >> inlineParserClass [ - - ^ MicInlineParser -] - { #category : 'accessing' } MicInlineElement >> kind [ "Should only be used for tests"