Skip to content

Commit 0e51276

Browse files
committed
correcting openTutorialPage
1 parent c03a1bf commit 0e51276

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Tutorial-o-Matic/src/main/groovy/ToM.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,9 @@ class ToM{
721721
return openTutorialPageString(nodeDirection, mapa)
722722
}
723723
if(nodeDirection instanceof ApiNode) {
724+
def newPageFile= nodeDirection.link?.file // TODO: probar que tome link de nodo si no existe el del attributo
724725
def newPageUri = nodeDirection[attributeNewPageLink].uri ?: nodeDirection.link?.uri // TODO: probar que tome link de nodo si no existe el del attributo
726+
mapa = mapa ?: (newPageFile && !newPageUri.absolute && !newPageUri.scheme && newPageUri.path.endsWith('.mm'))? getMapFromPath(newPageFile.path, false) : null
725727
mapa = mapa ?: nodeDirection.map
726728
return openTutorialPage(newPageUri, mapa)
727729
}
@@ -750,7 +752,7 @@ class ToM{
750752
}
751753

752754
def static isValidUri(uri){
753-
return uri && (!uri.scheme && uri.fragment?.startsWith('ID_') || isMindmap(uri))
755+
return uri && (!uri.scheme && (uri.fragment?.startsWith('ID_') || uri.path?.endsWith('.mm'))|| isMindmap(uri))
754756
}
755757

756758
def static openTutorialPageString(String nodeId, ApiMindMap tutMap){

0 commit comments

Comments
 (0)