Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 [

Expand All @@ -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 [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Class {
'class',
'fromClass'
],
#category : 'Microdown-RichTextComposer',
#package : 'Microdown-RichTextComposer'
#category : 'Microdown-RichTextComposer-Builder',
#package : 'Microdown-RichTextComposer',
#tag : 'Builder'
}

{ #category : 'private' }
Expand Down
4 changes: 3 additions & 1 deletion src/Microdown-RichTextComposer/MicRichTextComposer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
4 changes: 3 additions & 1 deletion src/Microdown-RichTextComposer/MicSemanticAction.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
13 changes: 6 additions & 7 deletions src/Microdown/Microdown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
Loading