Renaming and modularizing.
This commit is contained in:
parent
37d6000702
commit
4beca346be
@ -1,17 +1,23 @@
|
|||||||
Extension { #name : #ByteString }
|
Extension { #name : #ByteString }
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
ByteString >> admonitionStartingLines [
|
ByteString >> admonitionBorderLines [
|
||||||
| admonitions response |
|
| response |
|
||||||
admonitions := #('info' 'success' 'warning' 'danger') collect: [ :each | ':::', each ].
|
|
||||||
response := OrderedDictionary new.
|
response := OrderedDictionary new.
|
||||||
self lines doWithIndex: [:line :index |
|
self lines doWithIndex: [:line :index |
|
||||||
(admonitions includes: line trimBoth)
|
(self admonitionBorders includes: line trimBoth)
|
||||||
ifTrue: [ response at: index put: line trimBoth ]
|
ifTrue: [ response at: index put: line trimBoth ]
|
||||||
].
|
].
|
||||||
^ response
|
^ response
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #'*MiniDocs' }
|
||||||
|
ByteString >> admonitionBorders [
|
||||||
|
| response |
|
||||||
|
response := #('info' 'success' 'warning' 'danger') collect: [ :each | ':::', each ].
|
||||||
|
^ response copyWith: ':::'
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
ByteString >> email [
|
ByteString >> email [
|
||||||
"Quick fix for importing Lepiter pages that have a plain ByteString field as email."
|
"Quick fix for importing Lepiter pages that have a plain ByteString field as email."
|
||||||
@ -19,7 +25,7 @@ ByteString >> email [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*MiniDocs' }
|
{ #category : #'*MiniDocs' }
|
||||||
ByteString >> splitLines [
|
ByteString >> markdownSplitLines [
|
||||||
"I'm useful for conversions between the HedgeDoc Markdown variant and Lepiter page snippets.
|
"I'm useful for conversions between the HedgeDoc Markdown variant and Lepiter page snippets.
|
||||||
I provide broad places to where semantic breaks should be located in a page,
|
I provide broad places to where semantic breaks should be located in a page,
|
||||||
depending on headers or admonitions to create pages snippets with similar divisions.
|
depending on headers or admonitions to create pages snippets with similar divisions.
|
||||||
@ -28,7 +34,7 @@ ByteString >> splitLines [
|
|||||||
response := OrderedDictionary new.
|
response := OrderedDictionary new.
|
||||||
response := response
|
response := response
|
||||||
addAll: self markdownHeaders;
|
addAll: self markdownHeaders;
|
||||||
addAll: self admonitionStartingLines;
|
addAll: self admonitionBorderLines;
|
||||||
yourself.
|
yourself.
|
||||||
^ (response associations sorted: [ :x :y | x key < y key ]) asOrderedDictionary
|
^ (response associations sorted: [ :x :y | x key < y key ]) asOrderedDictionary
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user