Skip to content

Commit

Permalink
rename flemark.extension property according to avisi-cloud#206
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Bessle committed Apr 23, 2023
1 parent aa3f019 commit 1e7054b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/example/workspace.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
*/
workspace "Big Bank plc" "This is an example workspace to illustrate the key features of Structurizr, via the DSL, based around a fictional online banking system." {
properties {
// full list of available "flexmark.extensions"
// full list of available "generatr.markdown.flexmark.extensions"
// "Abbreviation,Admonition,AnchorLink,Aside,Attributes,Autolink,Definition,Emoji,EnumeratedReference,Footnotes,GfmIssues,GfmStrikethroughSubscript,GfmTaskList,GfmUsers,GitLab,Ins,Macros,MediaTags,ResizableImage,Superscript,Tables,TableOfContents,SimulatedTableOfContents,Typographic,WikiLinks,XWikiMacro,YAMLFrontMatter,YouTubeLink"
// ATTENTION:
// * "flexmark.extensions" must be separated by comma
// * "generatr.markdown.flexmark.extensions" values must be separated by comma
// * it's not possible to use "GitLab" and "ResizableImage" extensions together
"flexmark.extensions" "Abbreviation,Admonition,AnchorLink,Attributes,Autolink,Definition,Emoji,Footnotes,GfmTaskList,GitLab,MediaTags,Tables,TableOfContents,Typographic"
"generatr.markdown.flexmark.extensions" "Abbreviation,Admonition,AnchorLink,Attributes,Autolink,Definition,Emoji,Footnotes,GfmTaskList,GitLab,MediaTags,Tables,TableOfContents,Typographic"
}
!docs workspace-docs
!adrs workspace-adrs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ val availableExtensionMap: MutableMap<String, Extension> = mutableMapOf<String,
fun buildFlexmarkConfig(generatorContext: GeneratorContext): FlexmarkConfig {
var flexmarkExtensionString: String = "Tables"

if (generatorContext.workspace.properties.containsKey("flexmark.extensions")) {
flexmarkExtensionString = generatorContext.workspace.properties["flexmark.extensions"] as String
if (generatorContext.workspace.properties.containsKey("generatr.markdown.flexmark.extensions")) {
flexmarkExtensionString = generatorContext.workspace.properties["generatr.markdown.flexmark.extensions"] as String
}

val flexmarkExtensionNames = flexmarkExtensionString.split(",")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MarkdownToHtmlTest : ViewModelTest() {
@Test
fun `doesnt translate markdown table with extension property without Tables`() {
val generatorContext = generatorContext().apply {
workspace.addProperty("flexmark.extensions", "Admonition")
workspace.addProperty("generatr.markdown.flexmark.extensions", "Admonition")
}
val viewModel = HomePageViewModel(generatorContext)

Expand All @@ -96,7 +96,7 @@ class MarkdownToHtmlTest : ViewModelTest() {
@Test
fun `translates markdown table with extension property containing Tables`() {
val generatorContext = generatorContext().apply {
workspace.addProperty("flexmark.extensions", "Admonition, Tables")
workspace.addProperty("generatr.markdown.flexmark.extensions", "Admonition, Tables")
}
val viewModel = HomePageViewModel(generatorContext)

Expand Down Expand Up @@ -136,7 +136,7 @@ class MarkdownToHtmlTest : ViewModelTest() {
@Test
fun `translates markdown admonition block with extension property containing Admonition`() {
val generatorContext = generatorContext().apply {
workspace.addProperty("flexmark.extensions", "Admonition, Tables")
workspace.addProperty("generatr.markdown.flexmark.extensions", "Admonition, Tables")
}
val viewModel = HomePageViewModel(generatorContext)

Expand Down Expand Up @@ -176,7 +176,7 @@ class MarkdownToHtmlTest : ViewModelTest() {
@Test
fun `translates mermaid graphings in markdown with extension property containing GitLab`() {
val generatorContext = generatorContext().apply {
workspace.addProperty("flexmark.extensions", "Admonition, GitLab, Tables")
workspace.addProperty("generatr.markdown.flexmark.extensions", "Admonition, GitLab, Tables")
}
val viewModel = HomePageViewModel(generatorContext)

Expand Down

0 comments on commit 1e7054b

Please sign in to comment.