diff --git a/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st b/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st index a41961f0..662493e2 100644 --- a/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st @@ -54,6 +54,14 @@ MicCodeSemanticActionTest >> testEmptyString [ self deny: (self semanticActionClass from: '') hasEntity ] +{ #category : 'test - bogus entry' } +MicCodeSemanticActionTest >> testFirst [ + + + self shouldnt: [ self semanticActionClass from: 'first'] raise: MessageNotUnderstood. + self deny: (self semanticActionClass from: 'first') hasEntity +] + { #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testGlobalAccess [ @@ -68,6 +76,21 @@ MicCodeSemanticActionTest >> testMoreSpaces [ self deny: (self semanticActionClass from: ' ') hasEntity ] +{ #category : 'test - bogus entry' } +MicCodeSemanticActionTest >> testNil [ + + self shouldnt: [ self semanticActionClass from: 'nil'] raise: MessageNotUnderstood. + self deny: (self semanticActionClass from: 'nil') hasEntity +] + +{ #category : 'test - bogus entry' } +MicCodeSemanticActionTest >> testOne [ + + + self shouldnt: [ self semanticActionClass from: '1'] raise: MessageNotUnderstood. + self deny: (self semanticActionClass from: '1') hasEntity +] + { #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testOneSpace [ diff --git a/src/Microdown-RichTextComposer/MicDocumentHierarchyBuilder.class.st b/src/Microdown-RichTextComposer/MicDocumentHierarchyBuilder.class.st index 75839829..b39188a4 100644 --- a/src/Microdown-RichTextComposer/MicDocumentHierarchyBuilder.class.st +++ b/src/Microdown-RichTextComposer/MicDocumentHierarchyBuilder.class.st @@ -26,8 +26,9 @@ Class { 'class', 'fromClass' ], - #category : 'Microdown-RichTextComposer', - #package : 'Microdown-RichTextComposer' + #category : 'Microdown-RichTextComposer-Builder', + #package : 'Microdown-RichTextComposer', + #tag : 'Builder' } { #category : 'private' } diff --git a/src/Microdown-RichTextComposer/MicRichTextComposer.class.st b/src/Microdown-RichTextComposer/MicRichTextComposer.class.st index f9420428..93452d6f 100644 --- a/src/Microdown-RichTextComposer/MicRichTextComposer.class.st +++ b/src/Microdown-RichTextComposer/MicRichTextComposer.class.st @@ -586,7 +586,9 @@ MicRichTextComposer >> visitMonospace: anObject [ ifTrue: [ canvas includeAttribute: (TextAction new actOnClickBlock: [ sem entity browse ]) in: [ super visitMonospace: anObject ] ] - ifFalse: [ super visitMonospace: anObject]]. + ifFalse: [ + "when we have `nil` we may not display it in blue" + super visitMonospace: anObject]]. ] { #category : 'visiting - list' } diff --git a/src/Microdown-RichTextComposer/MicSemanticAction.class.st b/src/Microdown-RichTextComposer/MicSemanticAction.class.st index 5168cbfa..99a89d09 100644 --- a/src/Microdown-RichTextComposer/MicSemanticAction.class.st +++ b/src/Microdown-RichTextComposer/MicSemanticAction.class.st @@ -144,7 +144,9 @@ MicSemanticAction >> getPackageOrNil [ MicSemanticAction >> getTagOrNil [ | tagName | - tagName := tokens first asSymbol. + tagName := tokens first + ifNil: [ ^ nil ] + ifNotNil: [:tn | tn asString]. self class packageOrganizer packages do: [ :package | (tagName beginsWith: package name) ifTrue: [ package tags do: [ :tag | diff --git a/src/Microdown/Microdown.class.st b/src/Microdown/Microdown.class.st index deb4c792..a15c249c 100644 --- a/src/Microdown/Microdown.class.st +++ b/src/Microdown/Microdown.class.st @@ -145,13 +145,12 @@ Microdown >> parse: aStreamOrString [ { #category : 'facade' } Microdown >> parseFile: aFile [ - "Parse and return a document from the argument marking it with the file it is contained in. This is important for path resolution." - - | root | - root := MicParser parse: aFile contents. - root fromFile: aFile. - ^ root - + "Parse and return a document from the argument marking it with the file it is contained in. This is important for path resolution." + + | root | + root := MicrodownParser parse: aFile contents. + root fromFile: aFile. + ^ root ] { #category : 'facade' }