├── .github ├── scripts │ ├── preLoading.st │ └── preTesting.st └── workflows │ ├── tests-all.yml │ └── tests.yml ├── .project ├── .smalltalk.All.ston ├── .smalltalk.Release.ston ├── .smalltalk.ston ├── License.txt ├── README.md ├── doc ├── api.md ├── extension.md ├── readme.md ├── syntax.md ├── testMicrodown │ ├── images │ │ └── image1.png │ ├── other.md │ ├── readme.md │ ├── subfolder │ │ ├── subfolderdocument.md │ │ └── subfolderimage.png │ └── toplevel.png ├── tools.md └── validation.md ├── ressource ├── Modernist.css ├── awsm.css ├── awsm.min.css ├── awsm_theme_big-stone.css ├── awsm_theme_big-stone.min.css ├── awsm_theme_black.css ├── awsm_theme_black.min.css ├── awsm_theme_gondola.css ├── awsm_theme_gondola.min.css ├── awsm_theme_mischka.css ├── awsm_theme_mischka.min.css ├── awsm_theme_pastel-pink.css ├── awsm_theme_pastel-pink.min.css ├── awsm_theme_pearl-lusta.css ├── awsm_theme_pearl-lusta.min.css ├── awsm_theme_tasman.css ├── awsm_theme_tasman.min.css ├── awsm_theme_white.css ├── awsm_theme_white.min.css ├── axist.min.css ├── brightlight-green.css ├── chota.min.css ├── classless-tiny.css ├── classless.css ├── concrete.css ├── dark.min.css ├── darkfairy-pink.css ├── darkforest-green.css ├── light.min.css ├── lightfairy-pink.css ├── mercury.min.css ├── midnight-green.css ├── mvp.css ├── new.min.css ├── night.css ├── picnic.css ├── sakura.css ├── simple.css ├── simple.min.css ├── sp.min.css ├── spcss ├── splendor.min.css ├── style.css ├── style.min.css ├── stylize.css ├── stylize.min.css ├── terminal.css ├── themes.css ├── tufte.min.css ├── water.min.css ├── wing.min.css ├── yorha.css └── yorha.min.css ├── screen.png └── src ├── .properties ├── BaselineOfMicrodown ├── BaselineOfMicrodown.class.st ├── ManifestBaselineOfMicrodown.class.st └── package.st ├── BaselineOfMicrodownH5P ├── BaselineOfMicrodownH5P.class.st └── package.st ├── BaselineOfPillarSlideConverter ├── BaselineOfPillarSlideConverter.class.st └── package.st ├── Microdown - HTML ├── MicHTMLBrush.class.st ├── MicHTMLCanvas.class.st ├── MicHTMLExporterTest.class.st ├── MicHTMLTag.class.st ├── MicHTMLWriter.class.st └── package.st ├── Microdown-Agenda-Tests ├── MicAgendaBlockTest.class.st ├── MicAgendaGeneratorTest.class.st ├── MicDayBlockTest.class.st ├── MicSegmentBlockTest.class.st └── package.st ├── Microdown-Agenda ├── MicAbstractComponentBlock.class.st ├── MicAgendaBlock.class.st ├── MicAgendaGenerator.class.st ├── MicBreakBlock.class.st ├── MicDayBlock.class.st ├── MicSegmentBlock.class.st ├── MicTalkBlock.class.st └── package.st ├── Microdown-BeamerExporter-Tests ├── MicBeamerWriter2Test.class.st ├── MicBeamerWriterTest.class.st ├── MicFullNesterTest.class.st ├── MicMicrodownTopLevelHeaderToSlideTest.class.st ├── MicSlideFollowerNesterTest.class.st └── package.st ├── Microdown-BeamerExporter ├── MicBeamerWriter.class.st ├── MicFullNester2.class.st ├── MicMicrodownTopLevelHeaderToSlide.class.st ├── MicSlideFollowerNester.class.st └── package.st ├── Microdown-Blog-Tests ├── MicAbstractBlogCreatorTest.class.st ├── MicBlogCreatorTest.class.st ├── MicDummyBlogDeployer.class.st ├── MicFileTestResources.class.st ├── MicListSummarizerTest.class.st ├── MicMonthListCreatorTest.class.st ├── MicSingleSummarizerTest.class.st └── package.st ├── Microdown-Blog ├── MicAbstractBlogCreator.class.st ├── MicBlogCreator.class.st ├── MicListSummarizer.class.st ├── MicMonthListCreator.class.st ├── MicSingleSummarizer.class.st └── package.st ├── Microdown-BookTester-Tests ├── MicAnalysisReportWriterTest.class.st ├── MicBookTesterVisitorTest.class.st ├── MicFileCollectorTest.class.st ├── MicFileTest.class.st ├── MicMethodBodySyncTest.class.st ├── MicReferenceCheckerTest.class.st ├── MicResultTest.class.st └── package.st ├── Microdown-BookTester ├── Association.extension.st ├── MicAnalysisReportWriter.class.st ├── MicAnchorResult.class.st ├── MicBookTestResult.class.st ├── MicBookTesterNullStrategy.class.st ├── MicBookTesterStrategy.class.st ├── MicBrokenSyncDefinition.class.st ├── MicBrokenSyncOriginDefinition.class.st ├── MicCodeBlockValidator.class.st ├── MicDesynchronizedCodeResult.class.st ├── MicDuplicatedAnchorResult.class.st ├── MicExampleTesterStrategy.class.st ├── MicFileCollector.class.st ├── MicFileResult.class.st ├── MicReferenceChecker.class.st ├── MicReferenceToUnexistingAnchorResult.class.st ├── MicResult.class.st ├── MicSyncTesterStrategy.class.st ├── MicUndefinedFigureFileResult.class.st ├── MicUndefinedInputFileResult.class.st ├── MicUnreferencedFigureResult.class.st └── package.st ├── Microdown-BrowserExtensions ├── BaselineOf.extension.st ├── Class.extension.st ├── Package.extension.st ├── RGBehavior.extension.st ├── RGPackage.extension.st ├── TestCase.extension.st └── package.st ├── Microdown-Calypso ├── ManifestMicrodownCalypso.class.st └── package.st ├── Microdown-Evaluator-Tests ├── MicCodeblockEvaluatorTest.class.st └── package.st ├── Microdown-Evaluator ├── MicCodeBlock.extension.st ├── MicCodeblockEvaluator.class.st ├── MicCodeblockEvaluatorEnv.class.st ├── MicCompilationContext.class.st └── package.st ├── Microdown-H5P ├── MicH5PCommandLine.class.st ├── MicH5PTemplateWriter.class.st ├── MicH5PTemplateWriterTest.class.st ├── MicJPEGH5PTemplateWriter.class.st ├── MicPictureBasedWriter.class.st └── package.st ├── Microdown-HTMLExporter-Tests ├── MicCSSDownloaderTest.class.st ├── MicCSSFileResource.class.st ├── MicCSSFileTest.class.st ├── MicCSSFrameworkTest.class.st ├── MicCSSNullFileTest.class.st ├── MicCSSProviderTest.class.st ├── MicCSSThemeTest.class.st ├── MicDocFactory.class.st ├── MicHTMLBrushTest.class.st ├── MicHTMLCanvasTest.class.st ├── MicHTMLConfigurationTest.class.st ├── MicHTMLDocumentTest.class.st ├── MicHTMLExporterTest.class.st ├── MicHTMLTagTest.class.st ├── MicHTMLVisitorTest.class.st └── package.st ├── Microdown-HTMLExporter ├── MicCSSDownloader.class.st ├── MicCSSEntity.class.st ├── MicCSSFile.class.st ├── MicCSSFramework.class.st ├── MicCSSNullFile.class.st ├── MicCSSProvider.class.st ├── MicCSSTheme.class.st ├── MicHTMLBrush.class.st ├── MicHTMLCanvas.class.st ├── MicHTMLConfiguration.class.st ├── MicHTMLDocument.class.st ├── MicHTMLStyler.class.st ├── MicHTMLStylerAbstractPresenter.class.st ├── MicHTMLStylerApp.class.st ├── MicHTMLStylerCSSInfoPresenter.class.st ├── MicHTMLStylerCSSSourcePresenter.class.st ├── MicHTMLStylerCommand.class.st ├── MicHTMLStylerDetailViewsPresenter.class.st ├── MicHTMLStylerExportCommand.class.st ├── MicHTMLStylerExportOptionsPresenter.class.st ├── MicHTMLStylerHTMLOptionsPresenter.class.st ├── MicHTMLStylerHTMLSourcePresenter.class.st ├── MicHTMLStylerHelpCommand.class.st ├── MicHTMLStylerOpenCommand.class.st ├── MicHTMLStylerPreviewCommand.class.st ├── MicHTMLStylerQuitCommand.class.st ├── MicHTMLStylerUpdateCommand.class.st ├── MicHTMLTag.class.st ├── MicHTMLVisitor.class.st ├── MicListBlock.extension.st ├── MicListItemBlock.extension.st ├── MicRelativeResourceReference.extension.st ├── Microdown.extension.st ├── ZnClient.extension.st ├── ZnUrl.extension.st └── package.st ├── Microdown-LaTeXExporter-Tests ├── ManifestMicrodownLaTeXExporterTests.class.st ├── MicAbstractLaTexWriterTest.class.st ├── MicExportCanvasTest.class.st ├── MicLaTeXWriterTest.class.st ├── MicMinimalConfigurationTest.class.st ├── MicOutputStreamTest.class.st ├── MicSBALaTeXWriterTest.class.st └── package.st ├── Microdown-LaTeXExporter ├── MicDocumentWriter.class.st ├── MicExportBrush.class.st ├── MicExportCanvas.class.st ├── MicLaTeXBrush.class.st ├── MicLaTeXCanvas.class.st ├── MicLaTeXCommand.class.st ├── MicLaTeXEnvironment.class.st ├── MicLaTeXWriter.class.st ├── MicLatexPathUpdateVisitor.class.st ├── MicSBALaTeXWriter.class.st ├── MicTableBlock.extension.st └── package.st ├── Microdown-Macrodown-Pillar ├── MacLineBreakBlock.extension.st └── package.st ├── Microdown-Macrodown-Tests ├── MacInlineParserTest.class.st ├── MacParagraphBlockTest.class.st └── package.st ├── Microdown-Macrodown ├── MacConstants.class.st ├── MacInlineParser.class.st ├── MacLineBreakBlock.class.st ├── MacLineBreakDelimiter.class.st ├── MacMailtoResourceReference.class.st ├── MacParagraphBlock.class.st ├── MacRawParagraphBlock.class.st ├── MacrodownParser.class.st ├── MicAbstractDelimiter.extension.st ├── MicMicrodownObjectToPillarObjectConverter.extension.st ├── MicrodownVisitor.extension.st └── package.st ├── Microdown-MathFlaky-Tests ├── MicRichTextComposerTest.extension.st └── package.st ├── Microdown-ParentChildrenChecker ├── MicParentChildrenChecker.class.st ├── MicParentChildrenCheckerTest.class.st └── package.st ├── Microdown-Pharo-Tools ├── MicElement.extension.st └── package.st ├── Microdown-Pillar-Tests ├── MicAnchorBlockTest.extension.st ├── MicCodeBlockTest.extension.st ├── MicEnvironmentBlockTest.extension.st ├── MicHeaderBlockTest.extension.st ├── MicHorizontalLineBlockTest.extension.st ├── MicInlineParserTest.extension.st ├── MicMathBlockTest.extension.st ├── MicMicrodownObjectToPillarObjectConverterTest.class.st ├── MicOrderedListBlockTest.extension.st ├── MicParagraphBlockTest.extension.st ├── MicQuoteBlockTest.extension.st ├── MicRawBlockTest.extension.st ├── MicRootBlockTest.extension.st ├── MicTextualMicrodownToPillarTest.class.st ├── MicToPillarBasicTest.class.st ├── MicUnorderedListBlockTest.extension.st └── package.st ├── Microdown-Pillar ├── ManifestMicrodownPillar.class.st ├── MicAbstractBlock.extension.st ├── MicAnchorReferenceBlock.extension.st ├── MicAnnotationBlock.extension.st ├── MicBoldFormatBlock.extension.st ├── MicElement.extension.st ├── MicFigureBlock.extension.st ├── MicInlineElement.extension.st ├── MicInlineParser.extension.st ├── MicItalicFormatBlock.extension.st ├── MicLinkBlock.extension.st ├── MicMathInlineBlock.extension.st ├── MicMicrodownObjectToPillarObjectConverter.class.st ├── MicMonospaceFormatBlock.extension.st ├── MicRawBlock.extension.st ├── MicStrikeFormatBlock.extension.st ├── MicTextBlock.extension.st ├── Trait.extension.st └── package.st ├── Microdown-PrettyPrinter-Tests ├── MicDumperTest.class.st ├── MicTextualMicrodownExporterTest.class.st └── package.st ├── Microdown-PrettyPrinter ├── MicRealDumper.class.st ├── MicTextualMicrodownExporter.class.st └── package.st ├── Microdown-ReferenceChecker ├── MicReferenceChecker.class.st ├── MicReferenceCheckerTest.class.st └── package.st ├── Microdown-RenderingFeatures ├── MicCodeBlock.extension.st ├── MicCodeblockLineNumberer.class.st ├── MicCodeblockLineNumbererTest.class.st ├── MicHeadRenumbererTest.class.st ├── MicHeaderRenumberer.class.st ├── MicLevelLetterPrinter.class.st ├── MicLevelNumberPrinter.class.st ├── MicLevelRomanPrinter.class.st ├── MicLevelUpperLetterPrinter.class.st ├── MicTitlePrinter.class.st ├── MicTitlePrinterSpecification.class.st └── package.st ├── Microdown-ResolvePath-Tests └── package.st ├── Microdown-ResolvePath └── package.st ├── Microdown-RichTextComposer-Tests ├── ManifestMicrodownRichTextComposerTests.class.st ├── MicCenterAlignmentBlockTest.class.st ├── MicCodeSemanticActionTest.class.st ├── MicDynamicTextStylerTest.class.st ├── MicMockBaselineOf.class.st ├── MicParsesAndRendersAllCommentsTest.class.st ├── MicRichTextCodeBlockStylerDummyForTest.class.st ├── MicRichTextCodeBlockStylerTest.class.st ├── MicRichTextComposerTest.class.st ├── MicRichTextFormatConfigurationTest.class.st ├── MicRichTextLinkPresenterTest.class.st ├── MicRightAlignmentBlockTest.class.st ├── MicTemplatingTest.class.st └── package.st ├── Microdown-RichTextComposer ├── ManifestMicrodownRichTextComposer.class.st ├── MicCenterAlignmentBlock.class.st ├── MicDocumentHierarchyBuilder.class.st ├── MicDynamicTextStyler.class.st ├── MicRichTextBrush.class.st ├── MicRichTextCanvas.class.st ├── MicRichTextCodeBlockStyler.class.st ├── MicRichTextCodeBlockStylerDefault.class.st ├── MicRichTextCodeBlockStylerFullMethod.class.st ├── MicRichTextCodeBlockStylerUnstyledText.class.st ├── MicRichTextComposer.class.st ├── MicRichTextDoIt.class.st ├── MicRichTextFormatConfiguration.class.st ├── MicRichTextIndentBrush.class.st ├── MicRichTextLinkPresenter.class.st ├── MicRichTextTable.class.st ├── MicRichTextTableDataSource.class.st ├── MicRightAlignmentBlock.class.st ├── MicScalingTextAnchor.class.st ├── MicSemanticAction.class.st ├── MicSmalltalkTextStyler.class.st ├── MicTextStyler.class.st ├── MicrodownParser.extension.st ├── MicrodownVisitor.extension.st └── package.st ├── Microdown-Slide-Utils ├── MicPillarSlideConverter.class.st ├── MicPillarSlideConverterTest.class.st ├── MicSlideConverter.class.st └── package.st ├── Microdown-Templated ├── MicAbstractOutputDocumentMaker.class.st ├── MicLaTeXMaker.class.st ├── MicTemplatedWriter.class.st ├── MicTemplatedWriterTest.class.st ├── MicTextDocumentMaker.class.st └── package.st ├── Microdown-Tests-BookTester └── package.st ├── Microdown-Tests ├── ManifestMicrodownTests.class.st ├── MicAnchorBlockTest.class.st ├── MicAnchorLinkerTest.class.st ├── MicAnnotatedParagraphBlockTest.class.st ├── MicAnnotationSubclassTest.class.st ├── MicArgumentListTest.class.st ├── MicBlockQuoteBlockTest.class.st ├── MicBlockTest.class.st ├── MicCitationBlockTest.class.st ├── MicCodeBlockTest.class.st ├── MicColumnsBlockTest.class.st ├── MicCommentTest.class.st ├── MicElementTest.class.st ├── MicEnvironmentBlockTest.class.st ├── MicFigureBlockTest.class.st ├── MicFileResourceReferenceTest.class.st ├── MicFootnoteBlockTest.class.st ├── MicFormatBlockTest.class.st ├── MicHTTPResourceReferenceTest.class.st ├── MicHeaderBlockTest.class.st ├── MicHorizontalLineBlockTest.class.st ├── MicInlineBlockTest.class.st ├── MicInlineDelimiterTest.class.st ├── MicInlineExtenedSyntaxTest.class.st ├── MicInlineParserTest.class.st ├── MicInlineSpaceBlockTest.class.st ├── MicInlineTokenStreamTest.class.st ├── MicInputfileBlockTest.class.st ├── MicLinkBlockTest.class.st ├── MicMathBlockTest.class.st ├── MicMetaDataBlockTest.class.st ├── MicMicrodownSnippetFactory.class.st ├── MicMicrodownTextualBuilderTest.class.st ├── MicNoteBlockTest.class.st ├── MicOrderedListBlockTest.class.st ├── MicParagraphBlockTest.class.st ├── MicParserTest.class.st ├── MicPharoEvaluatortBlockTest.class.st ├── MicPharoImageResourceReferenceTest.class.st ├── MicPharoScriptBlockTest.class.st ├── MicRawBlockTest.class.st ├── MicRawParagraphBlockTest.class.st ├── MicRelativeResourceReferenceTest.class.st ├── MicResourceReferenceTest.class.st ├── MicResourceSettingsTest.class.st ├── MicRootBlockTest.class.st ├── MicScriptBlockExtensionForTest.class.st ├── MicScriptBlockExtensionTest.class.st ├── MicSlideBlockTest.class.st ├── MicStringExtensionTest.class.st ├── MicUnknownResourceUriTest.class.st ├── MicUnorderedListBlockTest.class.st ├── MicZincPathResolverTest.class.st ├── MicrodownParserTest.class.st ├── MicrodownTest.class.st ├── MicrodownVisitorTest.class.st └── package.st ├── Microdown-ToHelpMacrodownLoading ├── MicAbstractDelimiter.class.st ├── MicMicrodownObjectToPillarObjectConverter.class.st └── package.st ├── Microdown-Transformer-Tests ├── MicFileIncluderTest.class.st ├── MicNodeTransformerCodeDeleterMock.class.st ├── MicNodeTransformerTest.class.st └── package.st ├── Microdown-Transformer ├── MicCyclicFileInclusionError.class.st ├── MicElement.extension.st ├── MicFileIncluder.class.st ├── MicInputDocument.class.st ├── MicMicrodownInputDocument.class.st ├── MicNoInputDocument.class.st ├── MicNodeTransformer.class.st ├── MicRootBlock.extension.st ├── RelativePath.extension.st └── package.st ├── Microdown ├── FileReference.extension.st ├── ManifestMicrodown.class.st ├── MicAbsoluteResourceReference.class.st ├── MicAbstractAnnotatedBlock.class.st ├── MicAbstractBlock.class.st ├── MicAbstractCodeBlock.class.st ├── MicAbstractMicrodownTextualBuilder.class.st ├── MicAnchorBlock.class.st ├── MicAnchorLinker.class.st ├── MicAnchorReferenceBlock.class.st ├── MicAnnotatedParagraphBlock.class.st ├── MicAnnotationBlock.class.st ├── MicArgumentList.class.st ├── MicBlockQuoteBlock.class.st ├── MicBoldFormatBlock.class.st ├── MicBridge.class.st ├── MicCitationBlock.class.st ├── MicCodeBlock.class.st ├── MicColumnBlock.class.st ├── MicColumnsBlock.class.st ├── MicCommentBlock.class.st ├── MicContinuousMarkedBlock.class.st ├── MicElement.class.st ├── MicEnvironmentBlock.class.st ├── MicEvaluatedBlock.class.st ├── MicFigureBlock.class.st ├── MicFileResourceReference.class.st ├── MicFootnoteBlock.class.st ├── MicHTTPResourceReference.class.st ├── MicHeaderBlock.class.st ├── MicHorizontalLineBlock.class.st ├── MicInlineAlternativesDelimiter.class.st ├── MicInlineBlockWithUrl.class.st ├── MicInlineCommentBlock.class.st ├── MicInlineDelimiter.class.st ├── MicInlineElement.class.st ├── MicInlineHttpBlock.class.st ├── MicInlineHttpDelimiter.class.st ├── MicInlineParser.class.st ├── MicInlineSpaceBlock.class.st ├── MicInlineSpaceDelimiter.class.st ├── MicInlineStandardDelimiter.class.st ├── MicInlineToken.class.st ├── MicInlineTokenStream.class.st ├── MicInputfileBlock.class.st ├── MicItalicFormatBlock.class.st ├── MicLinkBlock.class.st ├── MicListBlock.class.st ├── MicListItemBlock.class.st ├── MicMailtoResourceReference.class.st ├── MicMathBlock.class.st ├── MicMathInlineBlock.class.st ├── MicMetaDataBlock.class.st ├── MicMicrodownSharedPool.class.st ├── MicMicrodownTextualBuilder.class.st ├── MicMinimalConfiguration.class.st ├── MicMonospaceFormatBlock.class.st ├── MicNestedMarkupBlock.class.st ├── MicNoteBlock.class.st ├── MicOrderedListBlock.class.st ├── MicOutputStream.class.st ├── MicParagraphBlock.class.st ├── MicParsingError.class.st ├── MicPharoEvaluatorBlock.class.st ├── MicPharoImageResourceReference.class.st ├── MicPharoScriptBlock.class.st ├── MicPropertyError.class.st ├── MicRawBlock.class.st ├── MicRawParagraphBlock.class.st ├── MicRelativeResourceReference.class.st ├── MicResourceReference.class.st ├── MicResourceReferenceError.class.st ├── MicRootBlock.class.st ├── MicSameStartStopMarkupBlock.class.st ├── MicScriptBlock.class.st ├── MicSharedPool.class.st ├── MicSingleLineBlock.class.st ├── MicSlideBlock.class.st ├── MicSourceBlock.class.st ├── MicStartStopMarkupBlock.class.st ├── MicStrikeFormatBlock.class.st ├── MicTableBlock.class.st ├── MicTextBlock.class.st ├── MicUnEvaluatedBlock.class.st ├── MicUnknownResourceUri.class.st ├── MicUnorderedListBlock.class.st ├── MicZincPathResolver.class.st ├── MicroSharedPool.class.st ├── Microdown.class.st ├── MicrodownParser.class.st ├── MicrodownVisitor.class.st ├── OrderedDictionary.extension.st ├── SequenceableCollection.extension.st ├── String.extension.st ├── Text.extension.st ├── ZnUrl.extension.st └── package.st └── microdown-fileParser ├── FileParser.class.st └── package.st /.github/scripts/preLoading.st: -------------------------------------------------------------------------------- 1 | 2 | #( 'Microdown' 'BeautifulComments' 'DocumentBrowser' ) do: [ :name | 3 | (IceRepository repositoryNamed: name) 4 | ifNil: [ self inform: 'Project not found: ' , name ] 5 | ifNotNil: [ :found | 6 | found 7 | unload; 8 | forget ] ] 9 | -------------------------------------------------------------------------------- /.github/scripts/preTesting.st: -------------------------------------------------------------------------------- 1 | "Adding this to pass a release test that does not has sense to run here" 2 | (FileLocator imageDirectory / 'pharo.version') writeStreamDo: [ :stream | 3 | stream << (SystemVersion current major asString, SystemVersion current minor asString) ] 4 | -------------------------------------------------------------------------------- /.github/workflows/tests-all.yml: -------------------------------------------------------------------------------- 1 | name: Microdown-Pharo-Integration 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | PHARO_CI_TESTING_ENVIRONMENT: 1 6 | 7 | on: 8 | push: 9 | branches: [ Pharo13 ] 10 | pull_request: 11 | branches: [ Pharo13 ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | build: 19 | strategy: 20 | matrix: 21 | os: [ ubuntu-latest ] 22 | smalltalk: [ Pharo64-alpha ] 23 | runs-on: ${{ matrix.os }} 24 | name: ${{ matrix.smalltalk }} on ${{ matrix.os }} 25 | steps: 26 | - uses: actions/checkout@v3 27 | with: 28 | fetch-depth: '0' 29 | - name: Setup smalltalkCI 30 | uses: hpi-swa/setup-smalltalkCI@v1 31 | with: 32 | smalltalk-version: ${{ matrix.smalltalk }} 33 | - name: Load Image and Run Release Tests 34 | run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.Release.ston 35 | timeout-minutes: 10 36 | - name: Clean Up 37 | run: rm -Rf ${{ env.SMALLTALK_CI_BUILD }} 38 | - name: Load Image and Run Tests 39 | run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.All.ston 40 | timeout-minutes: 30 41 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: MicroDown tests 2 | 3 | env: 4 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 5 | 6 | on: 7 | push: 8 | branches: 9 | - dev 10 | - master 11 | pull_request: 12 | branches: 13 | - dev 14 | - master 15 | workflow_dispatch: 16 | 17 | jobs: 18 | build: 19 | strategy: 20 | matrix: 21 | platform: [ubuntu-latest, macos-latest ] 22 | runs-on: ${{ matrix.platform }} 23 | steps: 24 | - uses: actions/checkout@v3 25 | with: 26 | fetch-depth: '0' 27 | - uses: hpi-swa/setup-smalltalkCI@v1 28 | id: smalltalkci 29 | with: 30 | smalltalk-image: Pharo64-alpha 31 | - run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} 32 | shell: bash 33 | timeout-minutes: 15 34 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | { 2 | 'srcDirectory' : 'src', 3 | 'tags' : [ #system ] 4 | } 5 | -------------------------------------------------------------------------------- /.smalltalk.All.ston: -------------------------------------------------------------------------------- 1 | SmalltalkCISpec { 2 | #preLoading : '.github/scripts/preLoading.st', 3 | #loading : [ 4 | SCIMetacelloLoadSpec { 5 | #baseline : 'Microdown', 6 | #directory : 'src', 7 | #onConflict : #useIncoming, 8 | #onUpgrade : #useIncoming, 9 | #registerInIceberg : true, 10 | #ignoreImage : true 11 | } 12 | ], 13 | #testing : { 14 | #include : { 15 | #packages : [ '.*' ] 16 | }, 17 | #exclude : { 18 | #packages : [ 19 | 'GT-Tests.*', 20 | 'Glamour-Tests.*', 21 | 'UnifiedFFI.*', 22 | 'ThreadedFFI.*', 23 | 'Monticello.*', 24 | 'Metacello.*', 25 | 'System-Settings-Tests.*', 26 | 'ReleaseTests.*' ], 27 | #classes : [ 28 | #OutOfMemoryTest, 29 | #TraitFileOutTest, 30 | #PlatformResolverTest, 31 | #SystemDependenciesTest, 32 | #DAMessageSendAnalyzerTest, 33 | #ProcessSpecificTest 34 | ] 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.smalltalk.Release.ston: -------------------------------------------------------------------------------- 1 | SmalltalkCISpec { 2 | #preLoading : '.github/scripts/preLoading.st', 3 | #loading : [ 4 | SCIMetacelloLoadSpec { 5 | #baseline : 'Microdown', 6 | #load : [ 'RichText', 'Tests' ], 7 | #onConflict : #useIncoming, 8 | #onUpgrade : #useIncoming, 9 | #ignoreImage : true, 10 | #directory : 'src', 11 | #registerInIceberg : true, 12 | #platforms : [ #pharo ] 13 | } 14 | ], 15 | #preTesting : [ '.github/scripts/preTesting.st' ], 16 | #testing : { 17 | #packages : [ 18 | 'Microdown.*', 19 | 'System-Settings-Tests.*', 20 | 'ReleaseTests.*' ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.smalltalk.ston: -------------------------------------------------------------------------------- 1 | SmalltalkCISpec { 2 | #preLoading : '.github/scripts/preLoading.st', 3 | #loading : [ 4 | SCIMetacelloLoadSpec { 5 | #baseline : 'Microdown', 6 | #onConflict : #useIncoming, 7 | #onUpgrade : #useIncoming, 8 | #ignoreImage : true, 9 | #directory : 'src', 10 | #registerInIceberg : true, 11 | #platforms : [ #pharo ] 12 | } 13 | ], 14 | #testing : { 15 | #exclude : { 16 | #packages : [ 17 | 'Microdown-MathFlaky-Tests' 18 | ] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2019 - 2022 Stéphane Ducasse, Kasper Osterbye 2 | with contributions of Guillermo Polito, Leo Frere, Gaylord Delporte, Laurine Dargaud, Lina Grangaud, Hernan Morales Durand, Esteban Lorenzano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /doc/testMicrodown/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pillar-markup/Microdown/06a90320c57c364509a412ac4721f0e704ab4302/doc/testMicrodown/images/image1.png -------------------------------------------------------------------------------- /doc/testMicrodown/other.md: -------------------------------------------------------------------------------- 1 | # Toplevel other document 2 | I am just a sibling document to the readme.md file. Nothing inside me. 3 | -------------------------------------------------------------------------------- /doc/testMicrodown/readme.md: -------------------------------------------------------------------------------- 1 | # Test documents 2 | This directory and its subdirectories contain documents whose sole purpose is to test access to http based documents, and the resolvers for relative links and images. 3 | 4 | This is a same level image 5 | 6 | ![](toplevel.png) 7 | 8 | This is a sub level image 9 | 10 | ![](images/image1.png) 11 | 12 | Link to a document in the same folder: 13 | 14 | [Link same folder](other.md) 15 | 16 | Link to a document in subfolder: 17 | 18 | [Link to subfolder](subfolder/subfolderdocument.md) 19 | -------------------------------------------------------------------------------- /doc/testMicrodown/subfolder/subfolderdocument.md: -------------------------------------------------------------------------------- 1 | # Test document 2 | This document is part of the testing of microdown access to http based documents and resolvers of same. 3 | 4 | This is an image in the same subfolder: 5 | 6 | ![](subfolderimage.png) 7 | 8 | This is an image in my parent folder: 9 | 10 | ![](../toplevel.png) 11 | 12 | And an image in a subfolder of my parent: 13 | 14 | ![](../images/image1.png) 15 | 16 | We must also be able to link to same and parent documents: 17 | 18 | Same subfolder: 19 | 20 | [Link to other document in subfolder](otherdocumentinsubfolder.md) 21 | 22 | Link to a document in parent folder: 23 | 24 | [Link to document in parent](../other.md) 25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/testMicrodown/subfolder/subfolderimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pillar-markup/Microdown/06a90320c57c364509a412ac4721f0e704ab4302/doc/testMicrodown/subfolder/subfolderimage.png -------------------------------------------------------------------------------- /doc/testMicrodown/toplevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pillar-markup/Microdown/06a90320c57c364509a412ac4721f0e704ab4302/doc/testMicrodown/toplevel.png -------------------------------------------------------------------------------- /ressource/night.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --nc-tx-1: #ffffff; 3 | --nc-tx-2: #eeeeee; 4 | --nc-bg-1: #000000; 5 | --nc-bg-2: #111111; 6 | --nc-bg-3: #222222; 7 | --nc-lk-1: #3291FF; 8 | --nc-lk-2: #0070F3; 9 | --nc-lk-tx: #FFFFFF; 10 | --nc-ac-1: #7928CA; 11 | --nc-ac-tx: #FFFFFF; 12 | } -------------------------------------------------------------------------------- /ressource/sp.min.css: -------------------------------------------------------------------------------- 1 | body{color:#333;font-family:helvetica,arial,sans-serif;line-height:1.5;margin:0 auto;max-width:40em;padding:0 1em}h1,h2,h3,h4,h5,h6{margin:1.25em 0 .5em;line-height:1.2}a:link{color:#00e}a:visited{color:#518}a:focus,a:hover{color:#03f}a:active{color:#e00}h1 a:empty:before,h2 a:empty:before,h3 a:empty:before,h4 a:empty:before,h5 a:empty:before,h6 a:empty:before{content:"#"}h1 a:empty,h2 a:empty,h3 a:empty,h4 a:empty,h5 a:empty,h6 a:empty{visibility:hidden;padding-left:.25em}h1:hover a:empty,h2:hover a:empty,h3:hover a:empty,h4:hover a:empty,h5:hover a:empty,h6:hover a:empty{visibility:visible}img{max-width:100%}figure{margin:1em 0;text-align:center}figcaption{font-size:small}code,kbd,pre,samp{font-family:monospace,monospace}code,kbd,pre{color:#050}samp{color:#730}blockquote,pre{background:#eee;padding:.5em}pre{overflow:auto}blockquote{border-left:medium solid #ccc;margin:1em 0}blockquote :first-child{margin-top:0}blockquote :last-child{margin-bottom:0}table{border-collapse:collapse}td,th{border:thin solid #999;padding:.3em .4em;text-align:left}@media (prefers-color-scheme:dark){body{background:#111;color:#bbb}a:link{color:#9bf}a:visited{color:#caf}a:focus,a:hover{color:#9cf}a:active{color:#f99}code,kbd,pre{color:#9c6;font-family:monospace,monospace}samp{color:#db0}blockquote,pre{background:#000}blockquote{border-color:#333}td,th{border-color:#666}} -------------------------------------------------------------------------------- /ressource/spcss: -------------------------------------------------------------------------------- 1 | body{color:#333;font-family:helvetica,arial,sans-serif;line-height:1.5;margin:0 auto;max-width:40em;padding:0 1em}h1,h2,h3,h4,h5,h6{margin:1.25em 0 .5em;line-height:1.2}a:link{color:#00e}a:visited{color:#518}a:focus,a:hover{color:#03f}a:active{color:#e00}h1 a:empty:before,h2 a:empty:before,h3 a:empty:before,h4 a:empty:before,h5 a:empty:before,h6 a:empty:before{content:"#"}h1 a:empty,h2 a:empty,h3 a:empty,h4 a:empty,h5 a:empty,h6 a:empty{visibility:hidden;padding-left:.25em}h1:hover a:empty,h2:hover a:empty,h3:hover a:empty,h4:hover a:empty,h5:hover a:empty,h6:hover a:empty{visibility:visible}img{max-width:100%}figure{margin:1em 0;text-align:center}figcaption{font-size:small}code,kbd,pre,samp{font-family:monospace,monospace}code,kbd,pre{color:#050}samp{color:#730}blockquote,pre{background:#eee;padding:.5em}pre{overflow:auto}blockquote{border-left:medium solid #ccc;margin:1em 0}blockquote :first-child{margin-top:0}blockquote :last-child{margin-bottom:0}table{border-collapse:collapse}td,th{border:thin solid #999;padding:.3em .4em;text-align:left}@media (prefers-color-scheme:dark){body{background:#111;color:#bbb}a:link{color:#9bf}a:visited{color:#caf}a:focus,a:hover{color:#9cf}a:active{color:#f99}code,kbd,pre{color:#9c6;font-family:monospace,monospace}samp{color:#db0}blockquote,pre{background:#000}blockquote{border-color:#333}td,th{border-color:#666}} -------------------------------------------------------------------------------- /ressource/terminal.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.xz.style/serve/fira-code.css"); 2 | 3 | :root { 4 | --nc-font-sans: 'Fira Code', monospace; 5 | --nc-font-mono: 'Fira Code', monospace; 6 | --nc-tx-1: #FFFFFF; 7 | --nc-tx-2: #EEEEEE; 8 | --nc-bg-1: #000000; 9 | --nc-bg-2: #002700; 10 | --nc-bg-3: #005800; 11 | --nc-lk-1: #00FF00; 12 | --nc-lk-2: #00c200; 13 | --nc-lk-tx: #000000; 14 | --nc-ac-1: #00FF00; 15 | --nc-ac-tx: #000000; 16 | } -------------------------------------------------------------------------------- /screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pillar-markup/Microdown/06a90320c57c364509a412ac4721f0e704ab4302/screen.png -------------------------------------------------------------------------------- /src/.properties: -------------------------------------------------------------------------------- 1 | { 2 | #format : #tonel 3 | } -------------------------------------------------------------------------------- /src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st: -------------------------------------------------------------------------------- 1 | " 2 | The Microdown project is a parser and document model for Microdown a clean and lean Markdown. 3 | See `#'Microdown'` 4 | " 5 | Class { 6 | #name : 'ManifestBaselineOfMicrodown', 7 | #superclass : 'PackageManifest', 8 | #category : 'BaselineOfMicrodown-Manifest', 9 | #package : 'BaselineOfMicrodown', 10 | #tag : 'Manifest' 11 | } 12 | -------------------------------------------------------------------------------- /src/BaselineOfMicrodown/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'BaselineOfMicrodown' } 2 | -------------------------------------------------------------------------------- /src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st: -------------------------------------------------------------------------------- 1 | " 2 | baseline: spec 3 | 4 | 5 | spec for: #'common' do: [ 6 | spec 7 | baseline: 'Mustache' 8 | with: [ spec 9 | repository: 'github://noha/mustache:v1.0/repository'; 10 | loads: #('Core' 'Tests') ]. 11 | spec 12 | package: #'Microdown-H5P' 13 | with: [ spec requires: #('Mustache') ] 14 | ] 15 | " 16 | Class { 17 | #name : 'BaselineOfMicrodownH5P', 18 | #superclass : 'BaselineOf', 19 | #category : 'BaselineOfMicrodownH5P', 20 | #package : 'BaselineOfMicrodownH5P' 21 | } 22 | 23 | { #category : 'baselines' } 24 | BaselineOfMicrodownH5P >> baseline: spec [ 25 | 26 | 27 | spec 28 | for: #(unix osx) 29 | do: [ spec 30 | baseline: 'OSSubprocess' 31 | with: [ spec repository: 'github://pharo-contributions/OSSubprocess:v1.4.0/repository' ] ]. 32 | 33 | spec for: #'common' do: [ 34 | "probably not needed with the latest version e.g. jpeg production." 35 | spec 36 | baseline: 'Mustache' 37 | with: [ spec 38 | repository: 'github://noha/mustache:v1.0/repository'; 39 | loads: #('Core' 'Tests') ]. 40 | spec 41 | package: #'Microdown-H5P' 42 | with: [ spec requires: #('Mustache' 'OSSubprocess') ] 43 | ] 44 | ] 45 | -------------------------------------------------------------------------------- /src/BaselineOfMicrodownH5P/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'BaselineOfMicrodownH5P' } 2 | -------------------------------------------------------------------------------- /src/BaselineOfPillarSlideConverter/BaselineOfPillarSlideConverter.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'BaselineOfPillarSlideConverter', 3 | #superclass : 'BaselineOf', 4 | #category : 'BaselineOfPillarSlideConverter', 5 | #package : 'BaselineOfPillarSlideConverter' 6 | } 7 | 8 | { #category : 'baselines' } 9 | BaselineOfPillarSlideConverter >> baseline: spec [ 10 | 11 | 12 | spec 13 | for: #common 14 | do: [ spec blessing: #baseline. 15 | spec 16 | baseline: 'PetitParser2Core' with: [ spec 17 | repository: 'github://kursjan/petitparser2' ]; 18 | package: 'Pillar-Core'; 19 | package: 'Pillar-Model'; 20 | package: 'Pillar-PetitPillar' with: [ spec 21 | requires: #( 'PetitParser2Core' 'Pillar-Model' ) ]; 22 | package: 'Microdown-Slide-Utils' with: [ spec 23 | requires: #( 'PetitParser2Core' 'Pillar-Model' "I do not put microdown here 24 | because I do not want") ]] 25 | 26 | 27 | ] 28 | -------------------------------------------------------------------------------- /src/BaselineOfPillarSlideConverter/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'BaselineOfPillarSlideConverter' } 2 | -------------------------------------------------------------------------------- /src/Microdown - HTML/MicHTMLBrush.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I'm an abstract brush dedicated to HTML documents. As of today, the only subclass is the tag brush but we can imagine others (e.g., to write HTML comments). 3 | " 4 | Class { 5 | #name : 'MicHTMLBrush', 6 | #superclass : 'MicExportBrush', 7 | #instVars : [ 8 | 'name' 9 | ], 10 | #category : 'Microdown - HTML', 11 | #package : 'Microdown - HTML' 12 | } 13 | -------------------------------------------------------------------------------- /src/Microdown - HTML/MicHTMLCanvas.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicHTMLCanvas', 3 | #superclass : 'MicExportCanvas', 4 | #instVars : [ 5 | 'name' 6 | ], 7 | #classVars : [ 8 | 'HTMLCharacters' 9 | ], 10 | #category : 'Microdown - HTML', 11 | #package : 'Microdown - HTML' 12 | } 13 | 14 | { #category : 'initialization' } 15 | MicHTMLCanvas class >> initialize [ 16 | HTMLCharacters := Dictionary new. 17 | HTMLCharacters 18 | at: $" put: '"'; 19 | at: $& put: '&'; 20 | at: $< put: '<'; 21 | at: $> put: '>' 22 | ] 23 | 24 | { #category : 'accessing' } 25 | MicHTMLCanvas >> nextPut: aCharacter [ 26 | (HTMLCharacters at: aCharacter ifAbsent: nil) 27 | ifNil: [ super nextPut: aCharacter ] 28 | ifNotNil: [ :string | self raw: string ] 29 | ] 30 | 31 | { #category : 'accessing' } 32 | MicHTMLCanvas >> tag [ 33 | ^ self brush: MicHTMLTag new 34 | ] 35 | -------------------------------------------------------------------------------- /src/Microdown - HTML/MicHTMLExporterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicHTMLExporterTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'parser', 6 | 'writer', 7 | 'factory' 8 | ], 9 | #category : 'Microdown - HTML', 10 | #package : 'Microdown - HTML' 11 | } 12 | 13 | { #category : 'utils' } 14 | MicHTMLExporterTest >> parse: aString andCheckWeGet: aResultingString [ 15 | 16 | | mic | 17 | mic := parser parse: aString. 18 | self assert: (writer visit: mic) contents equals: aResultingString 19 | ] 20 | 21 | { #category : 'running' } 22 | MicHTMLExporterTest >> setUp [ 23 | super setUp. 24 | parser := MicroDownParser new. 25 | writer := MicHTMLWriter new. 26 | factory := MicMicrodownSnippetFactory new 27 | ] 28 | 29 | { #category : 'tests' } 30 | MicHTMLExporterTest >> testHeaderLevel1 [ 31 | 32 | self parse: factory headerLevel1Sample andCheckWeGet: writer usedNewLine , '

Foo

' 33 | 34 | ] 35 | 36 | { #category : 'tests' } 37 | MicHTMLExporterTest >> testUnorderedList [ 38 | | mic | 39 | mic := parser parse: factory unorderedListWithTwoItemsSample. 40 | self assert: (writer visit: mic) contents equals: ' 41 |
    42 |
  • Foo
  • 43 |
  • Bar
  • 44 |
' 45 | ] 46 | -------------------------------------------------------------------------------- /src/Microdown - HTML/MicHTMLTag.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicHTMLTag', 3 | #superclass : 'MicHTMLBrush', 4 | #category : 'Microdown - HTML', 5 | #package : 'Microdown - HTML' 6 | } 7 | 8 | { #category : 'accessing' } 9 | MicHTMLTag >> name: aString [ 10 | name := aString. 11 | stream nextPut: $<; << aString 12 | ] 13 | 14 | { #category : 'accessing' } 15 | MicHTMLTag >> parameterAt: aString put: anotherString [ 16 | stream space. stream << aString << '="' << anotherString << '"' 17 | ] 18 | 19 | { #category : 'accessing' } 20 | MicHTMLTag >> with: aString [ 21 | stream 22 | nextPut: $>; 23 | << aString; 24 | << ' 27 | ] 28 | -------------------------------------------------------------------------------- /src/Microdown - HTML/MicHTMLWriter.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicHTMLWriter', 3 | #superclass : 'MicrodownVisitor', 4 | #instVars : [ 5 | 'stream', 6 | 'canvas' 7 | ], 8 | #category : 'Microdown - HTML', 9 | #package : 'Microdown - HTML' 10 | } 11 | 12 | { #category : 'initialization' } 13 | MicHTMLWriter >> canvasClass [ 14 | 15 | ^ MicHTMLCanvas 16 | ] 17 | 18 | { #category : 'accessing' } 19 | MicHTMLWriter >> contents [ 20 | ^ stream contents 21 | ] 22 | 23 | { #category : 'initialization' } 24 | MicHTMLWriter >> initialize [ 25 | super initialize. 26 | stream := MicOutputStream new setStream: (WriteStream on: (String new: 1000)). 27 | canvas := self canvasClass on: stream. 28 | 29 | ] 30 | 31 | { #category : 'initialization' } 32 | MicHTMLWriter >> usedNewLine [ 33 | "Return the encoded new line. Useful for tests." 34 | 35 | ^ stream usedNewLine 36 | ] 37 | 38 | { #category : 'visiting' } 39 | MicHTMLWriter >> visitHeader: aHeader [ 40 | 41 | canvas newLine. 42 | canvas tag 43 | name: 'h', aHeader level asString; 44 | with: aHeader header 45 | 46 | ] 47 | 48 | { #category : 'visiting' } 49 | MicHTMLWriter >> visitUnorderedList: anUnorderedList [ 50 | 51 | canvas newLine. 52 | canvas tag 53 | name: 'ul'; 54 | with: [ canvas newLine. super visitUnorderedList: anUnorderedList ] 55 | ] 56 | 57 | { #category : 'visiting' } 58 | MicHTMLWriter >> visitUnorderedListItem: anUnorderedListItem [ 59 | "will not work with we have text decorators such as bold, italic, monospace" 60 | 61 | canvas tag 62 | name: 'li'; 63 | with: anUnorderedListItem text. 64 | canvas newLine 65 | ] 66 | -------------------------------------------------------------------------------- /src/Microdown - HTML/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown - HTML' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicAgendaBlockTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'builder', 6 | 'parser' 7 | ], 8 | #pools : [ 9 | 'MicMicrodownSharedPool' 10 | ], 11 | #category : 'Microdown-Agenda-Tests', 12 | #package : 'Microdown-Agenda-Tests' 13 | } 14 | 15 | { #category : 'running' } 16 | MicAgendaBlockTest >> setUp [ 17 | 18 | super setUp. 19 | builder := MicMicrodownTextualBuilder new. 20 | parser := Microdown new. 21 | ] 22 | 23 | { #category : 'tests' } 24 | MicAgendaBlockTest >> testAgenda [ 25 | "' 27 | '" 28 | | source root env| 29 | source := EnvironmentOpeningBlockMarkup , 'agenda', String cr, 30 | EnvironmentClosingBlockMarkup, String cr. 31 | root := parser parse: source. 32 | env := root children first. 33 | self assert: (env isKindOf: MicAgendaBlock). 34 | self assert: env environmentName equals: 'agenda' 35 | ] 36 | 37 | { #category : 'tests' } 38 | MicAgendaBlockTest >> testAgendaWithArgument [ 39 | "' 41 | '" 42 | | source root env| 43 | source := EnvironmentOpeningBlockMarkup , 'agenda|title=A cool agenda', String cr, EnvironmentClosingBlockMarkup, String cr. 44 | root := parser parse: source. 45 | env := root children first. 46 | self assert: (env isKindOf: MicAgendaBlock). 47 | self assert: env environmentName equals: 'agenda'. 48 | self assert: env title equals: 'A cool agenda' 49 | ] 50 | -------------------------------------------------------------------------------- /src/Microdown-Agenda-Tests/MicDayBlockTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicDayBlockTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'builder', 6 | 'parser' 7 | ], 8 | #pools : [ 9 | 'MicMicrodownSharedPool' 10 | ], 11 | #category : 'Microdown-Agenda-Tests', 12 | #package : 'Microdown-Agenda-Tests' 13 | } 14 | 15 | { #category : 'running' } 16 | MicDayBlockTest >> setUp [ 17 | 18 | super setUp. 19 | builder := MicMicrodownTextualBuilder new. 20 | parser := Microdown new. 21 | ] 22 | 23 | { #category : 'tests' } 24 | MicDayBlockTest >> testDay [ 25 | "' 27 | '" 28 | | source root env| 29 | source := EnvironmentOpeningBlockMarkup , 'day', String cr, 30 | EnvironmentClosingBlockMarkup, String cr. 31 | root := parser parse: source. 32 | env := root children first. 33 | self assert: (env isKindOf: MicDayBlock). 34 | self assert: env environmentName equals: 'day' 35 | ] 36 | 37 | { #category : 'tests' } 38 | MicDayBlockTest >> testDayWithArgument [ 39 | "' 41 | '" 42 | | source root env| 43 | source := EnvironmentOpeningBlockMarkup , 'day|start=05/12/2022', String cr, EnvironmentClosingBlockMarkup, String cr. 44 | root := parser parse: source. 45 | env := root children first. 46 | self assert: (env isKindOf: MicDayBlock). 47 | self assert: env environmentName equals: 'day'. 48 | self assert: env start equals: '05/12/2022' 49 | ] 50 | -------------------------------------------------------------------------------- /src/Microdown-Agenda-Tests/MicSegmentBlockTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicSegmentBlockTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'builder', 6 | 'parser' 7 | ], 8 | #pools : [ 9 | 'MicMicrodownSharedPool' 10 | ], 11 | #category : 'Microdown-Agenda-Tests', 12 | #package : 'Microdown-Agenda-Tests' 13 | } 14 | 15 | { #category : 'running' } 16 | MicSegmentBlockTest >> setUp [ 17 | 18 | super setUp. 19 | builder := MicMicrodownTextualBuilder new. 20 | parser := Microdown new. 21 | ] 22 | 23 | { #category : 'tests' } 24 | MicSegmentBlockTest >> testSegment [ 25 | "' 27 | '" 28 | | source root env| 29 | source := EnvironmentOpeningBlockMarkup , 'segment', 30 | String cr, EnvironmentClosingBlockMarkup, String cr. 31 | root := parser parse: source. 32 | env := root children first. 33 | self assert: (env isKindOf: MicSegmentBlock). 34 | self assert: env environmentName equals: 'segment'. 35 | ] 36 | 37 | { #category : 'tests' } 38 | MicSegmentBlockTest >> testSegmentWithArgument [ 39 | "' 41 | '" 42 | | source root env| 43 | source := EnvironmentOpeningBlockMarkup , 'segment|start=10h', String cr, EnvironmentClosingBlockMarkup, String cr. 44 | root := parser parse: source. 45 | env := root children first. 46 | self assert: (env isKindOf: MicSegmentBlock). 47 | self assert: env environmentName equals: 'segment'. 48 | self assert: env start equals: '10h' 49 | ] 50 | -------------------------------------------------------------------------------- /src/Microdown-Agenda-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Agenda-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicAbstractComponentBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I am an abstractComponent which represent the standard behaviour of each components of a Segment. 3 | " 4 | Class { 5 | #name : 'MicAbstractComponentBlock', 6 | #superclass : 'MicSegmentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'testing' } 12 | MicAbstractComponentBlock class >> isAbstract [ 13 | 14 | ^ self == MicAbstractComponentBlock 15 | ] 16 | 17 | { #category : 'accessing' } 18 | MicAbstractComponentBlock >> author [ 19 | 20 | ^ self arguments at: #author ifAbsent: [ 'Not Specified' ] 21 | ] 22 | 23 | { #category : 'accessing' } 24 | MicAbstractComponentBlock >> author: anAuthor [ 25 | 26 | arguments at: #author put: anAuthor 27 | ] 28 | 29 | { #category : 'accessing' } 30 | MicAbstractComponentBlock >> length [ 31 | 32 | ^ self arguments at: #length ifAbsent: [ 'There is no length' ] 33 | ] 34 | 35 | { #category : 'accessing' } 36 | MicAbstractComponentBlock >> length: aLength [ 37 | 38 | arguments at: #length put: aLength 39 | ] 40 | 41 | { #category : 'accessing' } 42 | MicAbstractComponentBlock >> room [ 43 | 44 | ^ self arguments at: #room ifAbsent: [ 'Not Specified' ] 45 | ] 46 | 47 | { #category : 'accessing' } 48 | MicAbstractComponentBlock >> room: aRoom [ 49 | 50 | arguments at: #room put: aRoom 51 | ] 52 | 53 | { #category : 'accessing' } 54 | MicAbstractComponentBlock >> subject [ 55 | 56 | ^ self arguments at: #subject ifAbsent: [ 'There is no subject' ] 57 | ] 58 | 59 | { #category : 'accessing' } 60 | MicAbstractComponentBlock >> subject: aSubject [ 61 | 62 | arguments at: #subject put: aSubject 63 | ] 64 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicAgendaBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent an Agenda which contain the differents days which are my children. 3 | " 4 | Class { 5 | #name : 'MicAgendaBlock', 6 | #superclass : 'MicEnvironmentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'accessing' } 12 | MicAgendaBlock class >> tag [ 13 | ^ #agenda 14 | ] 15 | 16 | { #category : 'visiting' } 17 | MicAgendaBlock >> accept: aVisitor [ 18 | ^ aVisitor visitAgenda: self 19 | ] 20 | 21 | { #category : 'accessing' } 22 | MicAgendaBlock >> title [ 23 | 24 | ^ self arguments at: #title ifAbsent: [ 'There is no title' ] 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicAgendaBlock >> title: aTitle [ 29 | 30 | arguments at: #title put: aTitle 31 | ] 32 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicBreakBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a Break in a Segment like a break for lunch or a coffee time for a certain amount of time at a certain place. 3 | " 4 | Class { 5 | #name : 'MicBreakBlock', 6 | #superclass : 'MicAbstractComponentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'accessing' } 12 | MicBreakBlock class >> tag [ 13 | ^ #break 14 | ] 15 | 16 | { #category : 'visiting' } 17 | MicBreakBlock >> accept: aVisitor [ 18 | ^ aVisitor visitBreak: self 19 | ] 20 | 21 | { #category : 'accessing' } 22 | MicBreakBlock >> author [ 23 | 24 | ^ self arguments at: #author ifAbsent: [ '' ] 25 | ] 26 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicDayBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a Day in a Agenda with all my differents segment which are my children. 3 | " 4 | Class { 5 | #name : 'MicDayBlock', 6 | #superclass : 'MicEnvironmentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'accessing' } 12 | MicDayBlock class >> tag [ 13 | ^ #day 14 | ] 15 | 16 | { #category : 'visiting' } 17 | MicDayBlock >> accept: aVisitor [ 18 | ^ aVisitor visitDay: self 19 | ] 20 | 21 | { #category : 'accessing' } 22 | MicDayBlock >> start [ 23 | 24 | ^ self arguments at: #start ifAbsent: [ 'There is no start' ] 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicDayBlock >> start: aStart [ 29 | 30 | arguments at: #start put: aStart 31 | ] 32 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicSegmentBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a Segment of a Day which i contains all the differents components which are my children. 3 | " 4 | Class { 5 | #name : 'MicSegmentBlock', 6 | #superclass : 'MicEnvironmentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'accessing' } 12 | MicSegmentBlock class >> tag [ 13 | ^ #segment 14 | ] 15 | 16 | { #category : 'visiting' } 17 | MicSegmentBlock >> accept: aVisitor [ 18 | ^ aVisitor visitSegment: self 19 | ] 20 | 21 | { #category : 'accessing' } 22 | MicSegmentBlock >> start [ 23 | 24 | ^ self arguments at: #start ifAbsent: [ 'There is no start' ] 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicSegmentBlock >> start: aStart [ 29 | 30 | arguments at: #start put: aStart 31 | ] 32 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/MicTalkBlock.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a Talk in a Segment like a presentation of a new tool or projet by someone for a certains amount of time at a certain place. 3 | " 4 | Class { 5 | #name : 'MicTalkBlock', 6 | #superclass : 'MicAbstractComponentBlock', 7 | #category : 'Microdown-Agenda', 8 | #package : 'Microdown-Agenda' 9 | } 10 | 11 | { #category : 'accessing' } 12 | MicTalkBlock class >> tag [ 13 | ^ #talk 14 | ] 15 | 16 | { #category : 'visiting' } 17 | MicTalkBlock >> accept: aVisitor [ 18 | ^ aVisitor visitTalk: self 19 | ] 20 | -------------------------------------------------------------------------------- /src/Microdown-Agenda/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Agenda' } 2 | -------------------------------------------------------------------------------- /src/Microdown-BeamerExporter-Tests/MicFullNesterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicFullNesterTest', 3 | #superclass : 'TestCase', 4 | #category : 'Microdown-BeamerExporter-Tests-Experience', 5 | #package : 'Microdown-BeamerExporter-Tests', 6 | #tag : 'Experience' 7 | } 8 | 9 | { #category : 'tests' } 10 | MicFullNesterTest >> testShouldContainFollowingElement [ 11 | 12 | | doc pre nDoc | 13 | "I use faked slide ie without containting elements so that I can then test that the following items 14 | are placed in slide after the pass of the slide nester." 15 | 16 | doc := MicrodownParser new parse: 17 | ' 18 | # Level 1 - A!> 19 | 20 | ## Level 2 - A 21 | 22 | ## Level 2 - B 23 | 24 | ### Level 3 - A 25 | 26 | ## Level 2 - C 27 | 28 | # Level 1 - B!> 29 | 30 | ## Level 2 - A 31 | 32 | '. 33 | 34 | pre := MicFullNester2 new. 35 | 36 | pre treatChildrenOf: doc. 37 | nDoc := pre newDocument. 38 | "note that the doc have header with extra children and this does not make 39 | much sense even if this is correct from the algo. 40 | This should only be applied on new nodes as planned. 41 | 42 | " 43 | self assert: nDoc children size equals: 2. 44 | self assert: nDoc children first children size equals: 4. 45 | "one for the header text and three H2" 46 | 47 | 48 | ] 49 | -------------------------------------------------------------------------------- /src/Microdown-BeamerExporter-Tests/MicSlideFollowerNesterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicSlideFollowerNesterTest', 3 | #superclass : 'TestCase', 4 | #category : 'Microdown-BeamerExporter-Tests-Slide as header', 5 | #package : 'Microdown-BeamerExporter-Tests', 6 | #tag : 'Slide as header' 7 | } 8 | 9 | { #category : 'tests' } 10 | MicSlideFollowerNesterTest >> testShouldContainFollowingElement [ 11 | 12 | | doc nester | 13 | "I use faked slide ie without containting elements so that I can then test that the following items 14 | are placed in slide after the pass of the slide nester." 15 | 16 | doc := MicrodownParser new parse: 17 | ' 18 | 19 | ## Level 2 - A 20 | 21 | ### Level 3 - A 22 | 23 | ## Level 2 - B 24 | 25 | 26 | 27 | ## Level 2 - A 28 | 29 | '. 30 | 31 | nester := MicSlideFollowerNester new. 32 | 33 | nester treatElements: doc children. 34 | 35 | "note that the doc have header with extra children and this does not make 36 | much sense even if this is correct from the algo. 37 | This should only be applied on new nodes as planned. 38 | 39 | " 40 | 41 | self assert: doc children size equals: 2. 42 | self assert: doc children first children size equals: 3. 43 | "three H2" 44 | self assert: doc children second children size equals: 1. 45 | 46 | ] 47 | -------------------------------------------------------------------------------- /src/Microdown-BeamerExporter-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-BeamerExporter-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-BeamerExporter/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-BeamerExporter' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Blog-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Blog-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Blog/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Blog' } 2 | -------------------------------------------------------------------------------- /src/Microdown-BookTester-Tests/MicAnalysisReportWriterTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicAnalysisReportWriterTest', 3 | #superclass : 'TestCase', 4 | #category : 'Microdown-BookTester-Tests', 5 | #package : 'Microdown-BookTester-Tests' 6 | } 7 | 8 | { #category : 'tests' } 9 | MicAnalysisReportWriterTest >> testWithEmptyResults [ 10 | 11 | self assert: MicAnalysisReportWriter new report isEmpty 12 | ] 13 | 14 | { #category : 'tests' } 15 | MicAnalysisReportWriterTest >> testWithResults [ 16 | 17 | | reporter | 18 | reporter := MicAnalysisReportWriter new 19 | addResults: { MicBrokenSyncDefinition new }; 20 | addResults: { MicBrokenSyncOriginDefinition new }. 21 | self assert: reporter results size equals: 2. 22 | self deny: reporter report isEmpty 23 | ] 24 | -------------------------------------------------------------------------------- /src/Microdown-BookTester-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-BookTester-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/Association.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Association' } 2 | 3 | { #category : '*Microdown-BookTester' } 4 | Association >> isMicPaired [ 5 | " 6 | 7+3 >>> 10 7 | " 8 | 9 | ^ self key = self value 10 | ] 11 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicAnchorResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I'm the superclass of problem related to anchors. 3 | " 4 | Class { 5 | #name : 'MicAnchorResult', 6 | #superclass : 'MicResult', 7 | #instVars : [ 8 | 'anchorLabel' 9 | ], 10 | #category : 'Microdown-BookTester-Results', 11 | #package : 'Microdown-BookTester', 12 | #tag : 'Results' 13 | } 14 | 15 | { #category : 'kinds' } 16 | MicAnchorResult class >> errorType [ 17 | 18 | ^ 'Anchor problem' 19 | ] 20 | 21 | { #category : 'accessing' } 22 | MicAnchorResult >> anchorLabel [ 23 | 24 | ^ anchorLabel 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicAnchorResult >> anchorLabel: anObject [ 29 | 30 | anchorLabel := anObject 31 | ] 32 | 33 | { #category : 'accessing' } 34 | MicAnchorResult >> explanation [ 35 | 36 | ^ 'Anchor ', anchorLabel, ' is ', self isWhat, ' in file: ', source fullName 37 | 38 | ] 39 | 40 | { #category : 'accessing' } 41 | MicAnchorResult >> isWhat [ 42 | ^ 'anchor problem' 43 | ] 44 | 45 | { #category : 'accessing' } 46 | MicAnchorResult >> stonFormatExplanation [ 47 | 48 | ^ Association new key: anchorLabel value: source 49 | 50 | ] 51 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicBookTesterNullStrategy.class.st: -------------------------------------------------------------------------------- 1 | " 2 | When there is no tag other than none or language, does not verify the code block. 3 | " 4 | Class { 5 | #name : 'MicBookTesterNullStrategy', 6 | #superclass : 'MicBookTesterStrategy', 7 | #category : 'Microdown-BookTester-Analysis', 8 | #package : 'Microdown-BookTester', 9 | #tag : 'Analysis' 10 | } 11 | 12 | { #category : 'hook' } 13 | MicBookTesterNullStrategy class >> handleKey [ 14 | 15 | ^ #language 16 | 17 | ] 18 | 19 | { #category : 'main API' } 20 | MicBookTesterNullStrategy >> verify: aMicCodeBlock [ 21 | 22 | 23 | 24 | ] 25 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicBookTesterStrategy.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicBookTesterStrategy', 3 | #superclass : 'Object', 4 | #instVars : [ 5 | 'results' 6 | ], 7 | #category : 'Microdown-BookTester-Analysis', 8 | #package : 'Microdown-BookTester', 9 | #tag : 'Analysis' 10 | } 11 | 12 | { #category : 'hook' } 13 | MicBookTesterStrategy class >> handleKey [ 14 | 15 | ^ self subclassResponsibility 16 | 17 | ] 18 | 19 | { #category : 'accessing' } 20 | MicBookTesterStrategy >> results: aCollection [ 21 | results := aCollection 22 | ] 23 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicBrokenSyncDefinition.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I report that a sync definition is not correct. 3 | 4 | The sync feature is checking problems when true, ignored when false and reported as a broken sync definition else. 5 | 6 | ``` 7 | sync=what ever 8 | ``` 9 | " 10 | Class { 11 | #name : 'MicBrokenSyncDefinition', 12 | #superclass : 'MicResult', 13 | #instVars : [ 14 | 'syncValue', 15 | 'codeBlock' 16 | ], 17 | #category : 'Microdown-BookTester-Results', 18 | #package : 'Microdown-BookTester', 19 | #tag : 'Results' 20 | } 21 | 22 | { #category : 'kinds' } 23 | MicBrokenSyncDefinition class >> headerString [ 24 | 25 | ^ 'Broken sync definition [should be sync=''true|false''' 26 | ] 27 | 28 | { #category : 'building' } 29 | MicBrokenSyncDefinition >> codeBlock: aMicCodeBlock [ 30 | codeBlock := aMicCodeBlock 31 | ] 32 | 33 | { #category : 'accessing' } 34 | MicBrokenSyncDefinition >> explanation [ 35 | 36 | ^ 'The sync definition has the following broken value: ', syncValue, ' .' 37 | ] 38 | 39 | { #category : 'initialization' } 40 | MicBrokenSyncDefinition >> initialize [ 41 | 42 | super initialize. 43 | syncValue := 'empty' 44 | ] 45 | 46 | { #category : 'accessing' } 47 | MicBrokenSyncDefinition >> syncValue [ 48 | ^ syncValue 49 | ] 50 | 51 | { #category : 'accessing' } 52 | MicBrokenSyncDefinition >> syncValue: aString [ 53 | syncValue := aString 54 | ] 55 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicBrokenSyncOriginDefinition.class.st: -------------------------------------------------------------------------------- 1 | " 2 | The origin in `sync=true&origin=Class>>#selector` should point to a method. A method either in the instance or class side. 3 | 4 | I represent a wrong or badly defined origin specification so I represent that the 5 | user specified something else than C [class]>>#selector 6 | " 7 | Class { 8 | #name : 'MicBrokenSyncOriginDefinition', 9 | #superclass : 'MicResult', 10 | #instVars : [ 11 | 'origin', 12 | 'codeBlock' 13 | ], 14 | #category : 'Microdown-BookTester-Results', 15 | #package : 'Microdown-BookTester', 16 | #tag : 'Results' 17 | } 18 | 19 | { #category : 'kinds' } 20 | MicBrokenSyncOriginDefinition class >> headerString [ 21 | 22 | ^ 'Broken sync origin specification [ should be C [class]>>#selector ]' 23 | ] 24 | 25 | { #category : 'accessing' } 26 | MicBrokenSyncOriginDefinition >> explanation [ 27 | 28 | ^ 'The sync origin in the definition is bogus it should be C [class]>> #selector and we get: ', origin 29 | ] 30 | 31 | { #category : 'accessing' } 32 | MicBrokenSyncOriginDefinition >> initialize [ 33 | super initialize. 34 | origin := 'C [class]>>#selector' 35 | ] 36 | 37 | { #category : 'accessing' } 38 | MicBrokenSyncOriginDefinition >> originString: aString [ 39 | origin := aString 40 | ] 41 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicDuplicatedAnchorResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent the fact that an achor is defined more than one. 3 | " 4 | Class { 5 | #name : 'MicDuplicatedAnchorResult', 6 | #superclass : 'MicAnchorResult', 7 | #category : 'Microdown-BookTester-Results', 8 | #package : 'Microdown-BookTester', 9 | #tag : 'Results' 10 | } 11 | 12 | { #category : 'kinds' } 13 | MicDuplicatedAnchorResult class >> errorType [ 14 | 15 | ^ 'DuplicatedAnchor' 16 | ] 17 | 18 | { #category : 'kinds' } 19 | MicDuplicatedAnchorResult class >> headerString [ 20 | 21 | ^ 'Duplicated Anchors:' 22 | ] 23 | 24 | { #category : 'accessing' } 25 | MicDuplicatedAnchorResult >> isWhat [ 26 | ^ 'duplicated' 27 | ] 28 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicExampleTesterStrategy.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicExampleTesterStrategy', 3 | #superclass : 'MicBookTesterStrategy', 4 | #category : 'Microdown-BookTester-Analysis', 5 | #package : 'Microdown-BookTester', 6 | #tag : 'Analysis' 7 | } 8 | 9 | { #category : 'hook' } 10 | MicExampleTesterStrategy class >> handleKey [ 11 | 12 | ^ #example 13 | 14 | ] 15 | 16 | { #category : 'main API' } 17 | MicExampleTesterStrategy >> checkAssociation: aCodeBlockObject [ 18 | "Asserts the association created in any codeBlock " 19 | 20 | | association | 21 | association := self class compiler evaluate: aCodeBlockObject text. 22 | ^ association key = association value 23 | ] 24 | 25 | { #category : 'main API' } 26 | MicExampleTesterStrategy >> executeAndReportIn: aResult [ 27 | 28 | | isCorrect | 29 | isCorrect := false. 30 | [ isCorrect := self checkAssociation: aResult ] 31 | on: Exception 32 | do: [ :exception | aResult message: exception asString ]. 33 | aResult status: isCorrect. 34 | isCorrect ifTrue: [ aResult message: 'Test passed' ] 35 | ] 36 | 37 | { #category : 'main API' } 38 | MicExampleTesterStrategy >> verify: aCodeBlock [ 39 | 40 | | result | 41 | result := MicBookTestResult new. 42 | result text: aCodeBlock code. 43 | result sourceFileReference: aCodeBlock fromFile. 44 | results add: result. 45 | self executeAndReportIn: result. 46 | aCodeBlock isExpectedFailure 47 | ifTrue: [ 48 | result status: result status not. 49 | result isExpectedFailure: true ] 50 | ] 51 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicFileResult.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicFileResult', 3 | #superclass : 'MicResult', 4 | #category : 'Microdown-BookTester-Results', 5 | #package : 'Microdown-BookTester', 6 | #tag : 'Results' 7 | } 8 | 9 | { #category : 'accessing' } 10 | MicFileResult >> explanation [ 11 | 12 | ^ 'File input ', self what,' (in file ', source fullName , ') does not exist.' 13 | 14 | ] 15 | 16 | { #category : 'accessing' } 17 | MicFileResult >> stonFormatExplanation [ 18 | 19 | ^ '"', self what,'" : "', source , '"' 20 | 21 | ] 22 | 23 | { #category : 'accessing' } 24 | MicFileResult >> what [ 25 | 26 | ^ self subclassResponsibility 27 | ] 28 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicReferenceToUnexistingAnchorResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent the fact that a reference refers to an undefined anchor. 3 | " 4 | Class { 5 | #name : 'MicReferenceToUnexistingAnchorResult', 6 | #superclass : 'MicAnchorResult', 7 | #category : 'Microdown-BookTester-Results', 8 | #package : 'Microdown-BookTester', 9 | #tag : 'Results' 10 | } 11 | 12 | { #category : 'kinds' } 13 | MicReferenceToUnexistingAnchorResult class >> errorType [ 14 | 15 | ^ 'UndefinedAnchor' 16 | ] 17 | 18 | { #category : 'kinds' } 19 | MicReferenceToUnexistingAnchorResult class >> headerString [ 20 | 21 | ^ 'Undefined Anchors:' 22 | ] 23 | 24 | { #category : 'accessing' } 25 | MicReferenceToUnexistingAnchorResult >> isWhat [ 26 | ^ 'undefined' 27 | ] 28 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicUndefinedFigureFileResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a figure referencing an image file that does not exist. 3 | " 4 | Class { 5 | #name : 'MicUndefinedFigureFileResult', 6 | #superclass : 'MicFileResult', 7 | #instVars : [ 8 | 'figureFileString' 9 | ], 10 | #category : 'Microdown-BookTester-Results', 11 | #package : 'Microdown-BookTester', 12 | #tag : 'Results' 13 | } 14 | 15 | { #category : 'kinds' } 16 | MicUndefinedFigureFileResult class >> errorType [ 17 | 18 | ^ 'UndefinedFigureFiles:' 19 | ] 20 | 21 | { #category : 'kinds' } 22 | MicUndefinedFigureFileResult class >> headerString [ 23 | 24 | ^ 'Undefined figure files:' 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicUndefinedFigureFileResult >> explanation [ 29 | 30 | ^ 'Figure not found: ', self what,' (in file ', source fullName , ') was not found.' 31 | 32 | ] 33 | 34 | { #category : 'accessing' } 35 | MicUndefinedFigureFileResult >> figureFileString [ 36 | 37 | ^ figureFileString 38 | ] 39 | 40 | { #category : 'accessing' } 41 | MicUndefinedFigureFileResult >> figureFileString: aString [ 42 | 43 | figureFileString := aString 44 | ] 45 | 46 | { #category : 'accessing' } 47 | MicUndefinedFigureFileResult >> what [ 48 | 49 | ^ figureFileString 50 | ] 51 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicUndefinedInputFileResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent an input referencing a file that does not exist. 3 | " 4 | Class { 5 | #name : 'MicUndefinedInputFileResult', 6 | #superclass : 'MicFileResult', 7 | #instVars : [ 8 | 'inputFileBlock' 9 | ], 10 | #category : 'Microdown-BookTester-Results', 11 | #package : 'Microdown-BookTester', 12 | #tag : 'Results' 13 | } 14 | 15 | { #category : 'kinds' } 16 | MicUndefinedInputFileResult class >> errorType [ 17 | 18 | ^ 'UndefinedInputFiles' 19 | ] 20 | 21 | { #category : 'kinds' } 22 | MicUndefinedInputFileResult class >> headerString [ 23 | 24 | ^ 'Undefined input files:' 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicUndefinedInputFileResult >> explanation [ 29 | 30 | ^ 'Undefined file input: ', self what,' (in file ', source fullName , ') refer to file that does not exist.' 31 | 32 | ] 33 | 34 | { #category : 'inputFileBlock:' } 35 | MicUndefinedInputFileResult >> inputFile [ 36 | 37 | ^ inputFileBlock path 38 | ] 39 | 40 | { #category : 'accessing' } 41 | MicUndefinedInputFileResult >> inputFileBlock [ 42 | 43 | ^ inputFileBlock 44 | ] 45 | 46 | { #category : 'inputFileBlock:' } 47 | MicUndefinedInputFileResult >> inputFileBlock: anInputFileBlock [ 48 | inputFileBlock := anInputFileBlock 49 | ] 50 | 51 | { #category : 'accessing' } 52 | MicUndefinedInputFileResult >> what [ 53 | 54 | | path | 55 | self flag: #fixItLatter. 56 | path := self inputFileBlock path. 57 | ^ path isString 58 | ifTrue: [ path ] 59 | ifFalse: [ path fullName ] 60 | ] 61 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/MicUnreferencedFigureResult.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I represent a figure that refers to a file that does not exist. 3 | " 4 | Class { 5 | #name : 'MicUnreferencedFigureResult', 6 | #superclass : 'MicResult', 7 | #instVars : [ 8 | 'figure', 9 | 'anchorLabel', 10 | 'figurePath' 11 | ], 12 | #category : 'Microdown-BookTester-Results', 13 | #package : 'Microdown-BookTester', 14 | #tag : 'Results' 15 | } 16 | 17 | { #category : 'accessing' } 18 | MicUnreferencedFigureResult >> anchorLabel [ 19 | 20 | ^ anchorLabel 21 | ] 22 | 23 | { #category : 'accessing' } 24 | MicUnreferencedFigureResult >> anchorLabel: aString [ 25 | 26 | anchorLabel := aString 27 | ] 28 | 29 | { #category : 'accessing' } 30 | MicUnreferencedFigureResult >> explanation [ 31 | 32 | ^ 'Figure ', self what,' with anchor ', anchorLabel printString, ' (in file ', source fullName , ') is not referenced.' 33 | 34 | ] 35 | 36 | { #category : 'accessing' } 37 | MicUnreferencedFigureResult >> figure: aFigureBlock [ 38 | 39 | figure := aFigureBlock 40 | ] 41 | 42 | { #category : 'accessing' } 43 | MicUnreferencedFigureResult >> figurePath [ 44 | 45 | ^ figurePath 46 | ] 47 | 48 | { #category : 'accessing' } 49 | MicUnreferencedFigureResult >> figurePath: aString [ 50 | 51 | figurePath := aString 52 | ] 53 | 54 | { #category : 'accessing' } 55 | MicUnreferencedFigureResult >> what [ 56 | 57 | ^ figurePath printString 58 | ] 59 | -------------------------------------------------------------------------------- /src/Microdown-BookTester/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-BookTester' } 2 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/BaselineOf.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'BaselineOf' } 2 | 3 | { #category : '*Microdown-BrowserExtensions' } 4 | BaselineOf class >> buildMicroDownUsing: aBuilder withComment: aString [ 5 | aBuilder 6 | header: [ aBuilder text: self name ] withLevel: 1; 7 | horizontalLine; 8 | text: 'A baseline is a kind of map to load project.'; 9 | newLine; 10 | header: [ aBuilder text: 'Description' ] withLevel: 3; 11 | text: aString; 12 | newLine; 13 | header: [ aBuilder text: 'Dependencies' ] withLevel: 3. 14 | 15 | (self instanceSide includesLocalSelector: #baseline:) 16 | ifTrue: [ aBuilder 17 | codeblockTag: 'pharo' 18 | withBody: (self instanceSide sourceCodeAt: #baseline:) ] 19 | ] 20 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/Package.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'Package' } 2 | 3 | { #category : '*Microdown-BrowserExtensions' } 4 | Package >> buildMicroDownUsing: aBuilder withComment: aString [ 5 | 6 | "I'm on a package and the package is a baseline package." 7 | self class environment 8 | at: self name 9 | ifPresent: [ :cls | 10 | aBuilder 11 | header: [ aBuilder text: self name ] withLevel: 1; 12 | horizontalLine; 13 | text: 'A baseline is a kind of map to load project.'; 14 | newLine; 15 | header: [ aBuilder text: 'Description' ] withLevel: 3; 16 | text: aString; 17 | newLine; 18 | header: [ aBuilder text: 'Dependencies' ] withLevel: 3; 19 | codeblockTag: 'pharo' 20 | withBody: 21 | (cls 22 | sourceCodeAt: #baseline: 23 | ifAbsent: [ 'No baseline! Houston we have a problem' ]) ] 24 | ifAbsent: [ aBuilder 25 | header: [ 26 | aBuilder 27 | text: 'Package: '; 28 | text: self name ] 29 | withLevel: 1; 30 | horizontalLine; 31 | text: aString ] 32 | ] 33 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/RGBehavior.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'RGBehavior' } 2 | 3 | { #category : '*Microdown-BrowserExtensions' } 4 | RGBehavior >> buildMicroDownUsing: aMicMicrodownTextualBuilder withComment: aString [ 5 | 6 | aMicMicrodownTextualBuilder 7 | header: [ aMicMicrodownTextualBuilder text: 'Class: '. 8 | aMicMicrodownTextualBuilder text: self name ] withLevel: 1; 9 | horizontalLine; 10 | text: aString 11 | ] 12 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/RGPackage.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'RGPackage' } 2 | 3 | { #category : '*Microdown-BrowserExtensions' } 4 | RGPackage >> buildMicroDownUsing: aMicMicrodownTextualBuilder withComment: aString [ 5 | 6 | aMicMicrodownTextualBuilder 7 | header: [ aMicMicrodownTextualBuilder text: 'Class: '. 8 | aMicMicrodownTextualBuilder text: self name ] withLevel: 1; 9 | horizontalLine; 10 | text: aString 11 | ] 12 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/TestCase.extension.st: -------------------------------------------------------------------------------- 1 | Extension { #name : 'TestCase' } 2 | 3 | { #category : '*Microdown-BrowserExtensions' } 4 | TestCase class >> buildMicroDownUsing: aBuilder withComment: aString [ 5 | 6 | | number | 7 | number := self allTestSelectors size. 8 | aBuilder 9 | header: [ aBuilder text: self name ] withLevel: 1; 10 | horizontalLine; 11 | header: [ aBuilder text: 'Description' ] withLevel: 3; 12 | text: aString; 13 | newLine; 14 | header: [ aBuilder text: 'Tests' ] withLevel: 3; 15 | text: 'This test suite '. 16 | number isZero 17 | ifTrue: [ ^ aBuilder text: 'has no test methods.']. 18 | 19 | aBuilder 20 | text: 'defines ', number asString, ' test method'. 21 | number = 1 22 | ifFalse: [ aBuilder text: 's' ]. 23 | aBuilder text: ':'. 24 | 25 | aBuilder 26 | newLine; 27 | unorderedListDuring: [ self testSelectors 28 | do: [ :each | aBuilder item: [ aBuilder monospace: (self class instanceSide name , '>>#' , each) asString ] ]] 29 | ] 30 | -------------------------------------------------------------------------------- /src/Microdown-BrowserExtensions/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-BrowserExtensions' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Calypso/ManifestMicrodownCalypso.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I provide some extensions to the class browser Calypso. I allow rendering of package and class comments in MicroDown. 3 | " 4 | Class { 5 | #name : 'ManifestMicrodownCalypso', 6 | #superclass : 'PackageManifest', 7 | #category : 'Microdown-Calypso-Manifest', 8 | #package : 'Microdown-Calypso', 9 | #tag : 'Manifest' 10 | } 11 | -------------------------------------------------------------------------------- /src/Microdown-Calypso/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Calypso' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Evaluator-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Evaluator-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-Evaluator/MicCodeblockEvaluator.class.st: -------------------------------------------------------------------------------- 1 | " 2 | This transformer compiles the code content by a codeblock which have the parameters eval at true. 3 | 4 | ``` 5 | MicCodeblockEvaluator new 6 | visit: (Microdown 7 | parse: '```eval=true 8 | stream nextPutAll: ''Hello world'' 9 | \```') 10 | ``` 11 | " 12 | Class { 13 | #name : 'MicCodeblockEvaluator', 14 | #superclass : 'MicNodeTransformer', 15 | #category : 'Microdown-Evaluator', 16 | #package : 'Microdown-Evaluator' 17 | } 18 | 19 | { #category : 'visiting' } 20 | MicCodeblockEvaluator >> visitCode: aCodeBlock [ 21 | 22 | aCodeBlock isEvaluated 23 | ifTrue: [ self replaceCurrentNodeBy: aCodeBlock evaluate ] 24 | ] 25 | -------------------------------------------------------------------------------- /src/Microdown-Evaluator/MicCodeblockEvaluatorEnv.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I'm stupid helper to support the evaluation of codeBlock. 3 | 4 | When the MicCodeBlockEvaluator is loaded and the eval parameter is true then 5 | the user can use the stream to generate a different body of the codeblock using stream as receiver of 6 | stream messages. 7 | " 8 | Class { 9 | #name : 'MicCodeblockEvaluatorEnv', 10 | #superclass : 'Object', 11 | #instVars : [ 12 | 'stream' 13 | ], 14 | #category : 'Microdown-Evaluator', 15 | #package : 'Microdown-Evaluator' 16 | } 17 | 18 | { #category : 'initialization' } 19 | MicCodeblockEvaluatorEnv >> setStream: aStream [ 20 | stream := aStream 21 | ] 22 | -------------------------------------------------------------------------------- /src/Microdown-Evaluator/MicCompilationContext.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicCompilationContext', 3 | #superclass : 'MicElement', 4 | #instVars : [ 5 | 'configuration', 6 | 'input' 7 | ], 8 | #category : 'Microdown-Evaluator', 9 | #package : 'Microdown-Evaluator' 10 | } 11 | 12 | { #category : 'instance creation' } 13 | MicCompilationContext class >> configuration: aConfiguration [ 14 | ^ self new configuration: aConfiguration 15 | ] 16 | 17 | { #category : 'instance creation' } 18 | MicCompilationContext class >> withDocument: aDocument [ 19 | ^ self new 20 | input: aDocument; 21 | yourself 22 | ] 23 | 24 | { #category : 'instance creation' } 25 | MicCompilationContext class >> withDocument: aDocument withConfiguration: aConfiguration [ 26 | ^ self new 27 | input: aDocument; 28 | configuration: aConfiguration; 29 | yourself 30 | ] 31 | 32 | { #category : 'accessing' } 33 | MicCompilationContext >> configuration [ 34 | ^ configuration 35 | ] 36 | 37 | { #category : 'accessing' } 38 | MicCompilationContext >> configuration: aConfiguration [ 39 | configuration := aConfiguration 40 | ] 41 | 42 | { #category : 'accessing' } 43 | MicCompilationContext >> input [ 44 | ^ input 45 | ] 46 | 47 | { #category : 'accessing' } 48 | MicCompilationContext >> input: anObject [ 49 | input := anObject 50 | ] 51 | -------------------------------------------------------------------------------- /src/Microdown-Evaluator/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-Evaluator' } 2 | -------------------------------------------------------------------------------- /src/Microdown-H5P/MicH5PCommandLine.class.st: -------------------------------------------------------------------------------- 1 | " 2 | ``` 3 | ../../vms/100-x64/Pharo.app/Contents/MacOS/Pharo ./H5P.image clap h5p AboutBasket.pdf 4 | ``` 5 | " 6 | Class { 7 | #name : 'MicH5PCommandLine', 8 | #superclass : 'ClapApplication', 9 | #category : 'Microdown-H5P', 10 | #package : 'Microdown-H5P' 11 | } 12 | 13 | { #category : 'command line' } 14 | MicH5PCommandLine class >> h5p [ 15 | 16 | 17 | ^ (ClapCommand id: #h5p) 18 | description: 'To convert to h5p'; 19 | add: ClapFlag forHelp; 20 | add: ((ClapPositional id: #file) description: 'Files to be converted.'); 21 | meaning: [ :args | 22 | args at: #helpFlag ifPresent: [ :help | 23 | help value; exitSuccess ]. 24 | (self with: args) execute ] 25 | ] 26 | 27 | { #category : 'accessing' } 28 | MicH5PCommandLine >> argumentAt: identifier [ 29 | ^ (arguments at: identifier) value: self 30 | ] 31 | 32 | { #category : 'accessing' } 33 | MicH5PCommandLine >> execute [ 34 | 35 | MicPictureBasedWriter new 36 | sourcePDF: (FileSystem workingDirectory /(self argumentAt: #file)) fullName ; 37 | treatSourcePDF; 38 | go; 39 | compressH5P. 40 | ] 41 | -------------------------------------------------------------------------------- /src/Microdown-H5P/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-H5P' } 2 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/MicCSSDownloaderTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicCSSDownloaderTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'cssDownloader' 6 | ], 7 | #category : 'Microdown-HTMLExporter-Tests-CSS', 8 | #package : 'Microdown-HTMLExporter-Tests', 9 | #tag : 'CSS' 10 | } 11 | 12 | { #category : 'accessing' } 13 | MicCSSDownloaderTest >> cssDownloader [ 14 | " Answer the cssDownloader of this MicCSSDownloaderTest " 15 | 16 | ^ cssDownloader 17 | ] 18 | 19 | { #category : 'accessing' } 20 | MicCSSDownloaderTest >> cssDownloader: anObject [ 21 | " Sets the cssDownloader of this MicCSSDownloaderTest " 22 | 23 | cssDownloader := anObject 24 | ] 25 | 26 | { #category : 'running' } 27 | MicCSSDownloaderTest >> setUp [ 28 | 29 | super setUp. 30 | cssDownloader := MicCSSDownloader new 31 | cssProvider: MicCSSProvider new; 32 | yourself. 33 | ] 34 | 35 | { #category : 'autogenerated' } 36 | MicCSSDownloaderTest >> testCssProvider [ 37 | 38 | self assert: (cssDownloader cssProvider isKindOf: MicCSSProvider). 39 | 40 | ] 41 | 42 | { #category : 'autogenerated' } 43 | MicCSSDownloaderTest >> testDestinationPath [ 44 | 45 | self assert: (cssDownloader destinationPath isKindOf: String). 46 | self deny: cssDownloader destinationPath isEmpty. 47 | 48 | ] 49 | 50 | { #category : 'autogenerated' } 51 | MicCSSDownloaderTest >> testFrameworks [ 52 | 53 | self assert: (cssDownloader frameworks isKindOf: Collection). 54 | 55 | ] 56 | 57 | { #category : 'autogenerated' } 58 | MicCSSDownloaderTest >> testHttpClient [ 59 | 60 | self assert: (cssDownloader httpClient isKindOf: ZnClient). 61 | 62 | ] 63 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/MicCSSNullFileTest.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A MicCSSNullFileTest is a test class for testing the behavior of MicCSSNullFile 3 | " 4 | Class { 5 | #name : 'MicCSSNullFileTest', 6 | #superclass : 'MicCSSFileTest', 7 | #category : 'Microdown-HTMLExporter-Tests-CSS', 8 | #package : 'Microdown-HTMLExporter-Tests', 9 | #tag : 'CSS' 10 | } 11 | 12 | { #category : 'running' } 13 | MicCSSNullFileTest >> setUp [ 14 | 15 | super setUp. 16 | fileRef := MicCSSNullFile new. 17 | ] 18 | 19 | { #category : 'test' } 20 | MicCSSNullFileTest >> testContents [ 21 | 22 | self assert: (fileRef contents isKindOf: String). 23 | self assert: fileRef contents isEmpty. 24 | ] 25 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/MicCSSThemeTest.class.st: -------------------------------------------------------------------------------- 1 | Class { 2 | #name : 'MicCSSThemeTest', 3 | #superclass : 'TestCase', 4 | #instVars : [ 5 | 'cssTheme' 6 | ], 7 | #category : 'Microdown-HTMLExporter-Tests-CSS', 8 | #package : 'Microdown-HTMLExporter-Tests', 9 | #tag : 'CSS' 10 | } 11 | 12 | { #category : 'accessing' } 13 | MicCSSThemeTest >> cssTheme [ 14 | " Answer the cssTheme of this MicCSSThemeTest " 15 | 16 | ^ cssTheme 17 | ] 18 | 19 | { #category : 'accessing' } 20 | MicCSSThemeTest >> cssTheme: anObject [ 21 | " Sets the cssTheme of this MicCSSThemeTest " 22 | 23 | cssTheme := anObject 24 | ] 25 | 26 | { #category : 'running' } 27 | MicCSSThemeTest >> setUp [ 28 | 29 | super setUp. 30 | cssTheme := MicCSSTheme new 31 | framework: (MicCSSFramework new name: 'MockFramework'; yourself); 32 | yourself 33 | 34 | ] 35 | 36 | { #category : 'autogenerated' } 37 | MicCSSThemeTest >> testFramework [ 38 | 39 | self assert: (cssTheme framework isKindOf: MicCSSFramework). 40 | 41 | ] 42 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/MicHTMLBrushTest.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A MicHTMLBrushTest is a test class for testing the behavior of MicHTMLBrush 3 | " 4 | Class { 5 | #name : 'MicHTMLBrushTest', 6 | #superclass : 'TestCase', 7 | #instVars : [ 8 | 'tag' 9 | ], 10 | #category : 'Microdown-HTMLExporter-Tests-HTML', 11 | #package : 'Microdown-HTMLExporter-Tests', 12 | #tag : 'HTML' 13 | } 14 | 15 | { #category : 'running' } 16 | MicHTMLBrushTest >> setUp [ 17 | 18 | super setUp. 19 | tag := MicHTMLTag new 20 | setStream: (MicOutputStream new setStream: (WriteStream on: (String new: 1000))); 21 | yourself. 22 | ] 23 | 24 | { #category : 'accessing' } 25 | MicHTMLBrushTest >> tag [ 26 | 27 | ^ tag 28 | ] 29 | 30 | { #category : 'tests' } 31 | MicHTMLBrushTest >> testName [ 32 | 33 | tag name: 'prueba'. 34 | self assert: tag name equals: 'prueba' 35 | ] 36 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/MicHTMLCanvasTest.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A MicHTMLCanvasTest is a test class for testing the behavior of MicHTMLCanvas 3 | " 4 | Class { 5 | #name : 'MicHTMLCanvasTest', 6 | #superclass : 'TestCase', 7 | #instVars : [ 8 | 'canvas' 9 | ], 10 | #category : 'Microdown-HTMLExporter-Tests-HTML', 11 | #package : 'Microdown-HTMLExporter-Tests', 12 | #tag : 'HTML' 13 | } 14 | 15 | { #category : 'running' } 16 | MicHTMLCanvasTest >> setUp [ 17 | 18 | super setUp. 19 | canvas := MicHTMLCanvas on: (MicOutputStream new setStream: (WriteStream on: (String new: 1000))). 20 | 21 | ] 22 | 23 | { #category : 'tests' } 24 | MicHTMLCanvasTest >> testTag [ 25 | 26 | self assert: (canvas tag isKindOf: MicHTMLTag) 27 | ] 28 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter-Tests/package.st: -------------------------------------------------------------------------------- 1 | Package { #name : 'Microdown-HTMLExporter-Tests' } 2 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicCSSNullFile.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A special type of Microdown CSS file with contents empty. 3 | " 4 | Class { 5 | #name : 'MicCSSNullFile', 6 | #superclass : 'MicCSSFile', 7 | #category : 'Microdown-HTMLExporter-CSS', 8 | #package : 'Microdown-HTMLExporter', 9 | #tag : 'CSS' 10 | } 11 | 12 | { #category : 'accessing' } 13 | MicCSSNullFile >> contents [ 14 | "Answer a with the receiver's source code" 15 | 16 | ^ String empty 17 | ] 18 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicCSSTheme.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A theme is a variation in style of a CSS framework. Commonly this variation is minimal and mostly used for color schemes such as dark or light. Each theme knows which framework it belongs to. 3 | 4 | See superclass comments for details. 5 | " 6 | Class { 7 | #name : 'MicCSSTheme', 8 | #superclass : 'MicCSSEntity', 9 | #instVars : [ 10 | 'framework' 11 | ], 12 | #category : 'Microdown-HTMLExporter-CSS', 13 | #package : 'Microdown-HTMLExporter', 14 | #tag : 'CSS' 15 | } 16 | 17 | { #category : 'accessing' } 18 | MicCSSTheme >> framework [ 19 | "Answer the receiver's " 20 | 21 | ^ framework 22 | ] 23 | 24 | { #category : 'accessing' } 25 | MicCSSTheme >> framework: aMicCSSFramework [ 26 | "Set the receiver's " 27 | 28 | framework := aMicCSSFramework 29 | ] 30 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicHTMLBrush.class.st: -------------------------------------------------------------------------------- 1 | " 2 | I'm an abstract brush dedicated to HTML documents. As of today, the only subclass is the tag brush but we can imagine others (e.g., to write HTML comments). 3 | " 4 | Class { 5 | #name : 'MicHTMLBrush', 6 | #superclass : 'MicExportBrush', 7 | #instVars : [ 8 | 'name' 9 | ], 10 | #category : 'Microdown-HTMLExporter-Core', 11 | #package : 'Microdown-HTMLExporter', 12 | #tag : 'Core' 13 | } 14 | 15 | { #category : 'accessing' } 16 | MicHTMLBrush >> name [ 17 | "Answer a with the receiver's name" 18 | 19 | ^ name 20 | ] 21 | 22 | { #category : 'accessing' } 23 | MicHTMLBrush >> name: aString [ 24 | name := aString. 25 | stream nextPut: $<; << aString 26 | ] 27 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicHTMLCanvas.class.st: -------------------------------------------------------------------------------- 1 | " 2 | A specialized canvas to emit HTML tags. 3 | " 4 | Class { 5 | #name : 'MicHTMLCanvas', 6 | #superclass : 'MicExportCanvas', 7 | #category : 'Microdown-HTMLExporter-Core', 8 | #package : 'Microdown-HTMLExporter', 9 | #tag : 'Core' 10 | } 11 | 12 | { #category : 'writing text' } 13 | MicHTMLCanvas >> initialize [ 14 | "Private - Initialize the receiver's stream" 15 | 16 | super initialize. 17 | self initializeWith: String empty. 18 | ] 19 | 20 | { #category : 'initialization' } 21 | MicHTMLCanvas >> initializeWith: aString [ 22 | "Private - Set the receiver's stream to store the HTML contents" 23 | 24 | self setStream: (self newMicStreamOn: aString) 25 | ] 26 | 27 | { #category : 'initialization' } 28 | MicHTMLCanvas >> newMicStreamOn: aString [ 29 | "Answer a new wrapper over aString to help not hardcoding line ending everywhere." 30 | 31 | ^ MicOutputStream new 32 | setStream: (WriteStream on: aString); 33 | "nextPutAll: aString;" 34 | yourself 35 | ] 36 | 37 | { #category : 'accessing' } 38 | MicHTMLCanvas >> tag [ 39 | ^ self brush: MicHTMLTag new 40 | ] 41 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicHTMLStylerAbstractPresenter.class.st: -------------------------------------------------------------------------------- 1 | " 2 | Groups common behavior and provides helpers to access MicHTMLDoc object to subclasses. 3 | The **styler** is an instance of `MicHTMLStyler` passed as model before initialization. 4 | 5 | " 6 | Class { 7 | #name : 'MicHTMLStylerAbstractPresenter', 8 | #superclass : 'SpPresenter', 9 | #instVars : [ 10 | 'styler' 11 | ], 12 | #category : 'Microdown-HTMLExporter-Spec', 13 | #package : 'Microdown-HTMLExporter', 14 | #tag : 'Spec' 15 | } 16 | 17 | { #category : 'updating' } 18 | MicHTMLStylerAbstractPresenter >> micHtmlDocument [ 19 | 20 | ^ self styler micHtmlDocument 21 | ] 22 | 23 | { #category : 'initialization' } 24 | MicHTMLStylerAbstractPresenter >> setModelBeforeInitialization: aDomainObject [ 25 | 26 | styler := aDomainObject 27 | ] 28 | 29 | { #category : 'accessing' } 30 | MicHTMLStylerAbstractPresenter >> statusBarHeight [ 31 | 32 | ^ 25 33 | ] 34 | 35 | { #category : 'accessing' } 36 | MicHTMLStylerAbstractPresenter >> styler [ 37 | 38 | ^ styler 39 | ] 40 | 41 | { #category : 'accessing' } 42 | MicHTMLStylerAbstractPresenter >> stylerDetailsPresenter [ 43 | 44 | ^ self styler cssDetailsPresenter 45 | ] 46 | -------------------------------------------------------------------------------- /src/Microdown-HTMLExporter/MicHTMLStylerApp.class.st: -------------------------------------------------------------------------------- 1 | " 2 | The Spec hook for the Microdown CSS Styler, a tool to configure document export options from Microdown to HTML. 3 | 4 | See class side to open the UI. 5 | " 6 | Class { 7 | #name : 'MicHTMLStylerApp', 8 | #superclass : 'SpApplication', 9 | #category : 'Microdown-HTMLExporter-Spec', 10 | #package : 'Microdown-HTMLExporter', 11 | #tag : 'Spec' 12 | } 13 | 14 | { #category : 'instance creation' } 15 | MicHTMLStylerApp class >> menuCommandOn: aBuilder [ 16 | 17 | 18 | (aBuilder item: #'Microdown HTML Styler') 19 | parent: #Tools; 20 | action: [ self new run ]; 21 | icon: (self iconNamed: self taskbarIconName) 22 | ] 23 | 24 | { #category : 'instance creation' } 25 | MicHTMLStylerApp class >> open [ 26 |