13 lines
385 B
Smalltalk
13 lines
385 B
Smalltalk
Extension { #name : #LeSnippet }
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
LeSnippet class >> fromMetaMarkdeep: div [
|
|
| className metadata snippet |
|
|
className := (div xpath: '@st-class') stringValue.
|
|
metadata := STON fromString:(div xpath: '@st-data') stringValue.
|
|
snippet := className asClass new.
|
|
snippet injectMetadataFrom: metadata.
|
|
snippet contentFrom: div.
|
|
^ snippet.
|
|
]
|