-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b01567
commit 7323c6e
Showing
6 changed files
with
837 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...eidler.shr5.acceleo/src/de/urszeidler/shr5/acceleo/common/ShadowrunMarkdownSheetTools.mtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[comment encoding = UTF-8 /] | ||
[** | ||
* The documentation of the module. | ||
*/] | ||
[module ShadowrunMarkdownSheetTools('http://urszeidler.de/shr5/1.0', 'http://urszeidler.de/shr5mngt/1.0', 'http://www.eclipse.org/emf/2002/Ecore')/] | ||
|
||
[query public titelText(txt : String, heading : String) : String = heading+' '+self /] | ||
[query public titelText(txt : String) : String = self.titelText('###') /] | ||
|
||
[query public boldText(txt : String) : String = self.tagText('**') /] | ||
[query public italicText(txt : String) : String = self.tagText('*') /] | ||
[query public underlineText(txt : String) : String = self.tagText('u') /] | ||
[query public tagText(txt : String,tag : String) : String = tag +self+tag /] | ||
[query public quoteText(txt : String) : String = '> ' +self /] | ||
|
||
[query public startTag(txt : String,) : String = '['+ self + ']' /] | ||
[query public endTag(txt : String,) : String = '[/'+ self + ']' /] | ||
|
||
[query public cellText(txt : String) : String = self.tagText('td') /] | ||
[query public tableRow(row : Sequence(OclAny)) : String = (self->collect(e| (e.toString()).cellText())+'').tagText('tr') /] | ||
|
||
[query public table(txt : String) : String = self.tagText('table') /] | ||
[query public tableHeading(txt : String) : String = self.tagText('th') /] | ||
|
||
|
||
[** | ||
* Prints a row in the table | ||
*/] | ||
[template public printRow(row : Sequence(String))] | ||
[startTag('tr')/][for (it : String | row)] | ||
[startTag('td')/][it/][endTag('td')/][/for][endTag('tr')/] | ||
[/template] | ||
|
||
|
Oops, something went wrong.