Skip to content

Commit

Permalink
Fix Lecture and Exercises Links to be opened inside the app (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-wls authored Nov 7, 2024
1 parent 808ac65 commit 9005554
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class ArtemisMarkdownTransformer {
}

private val exerciseMarkdownPattern =
"\\[(text|quiz|lecture|modeling|file-upload|programing)](.*)\\(((?:/|\\w|\\d)+)\\)\\[/\\1]".toRegex()
"\\[(text|quiz|lecture|modeling|file-upload|programming)](.*)\\(((?:/|\\w|\\d)+)\\)\\[/\\1]".toRegex()
private val userMarkdownPattern = "\\[user](.*?)\\((.*?)\\)\\[/user]".toRegex()
private val channelMarkdownPattern = "\\[channel](.*?)\\((\\d+?)\\)\\[/channel]".toRegex()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package de.tum.informatics.www1.artemis.native_app.core.common.markdown

class PostArtemisMarkdownTransformer(val serverUrl: String, val courseId: Long) : ArtemisMarkdownTransformer() {
override fun transformExerciseMarkdown(title: String, url: String): String {
return "[$title]($serverUrl$url)"
return "[$title](artemis:/$url)"
}

override fun transformUserMentionMarkdown(text: String, fullName: String, userName: String): String = "[@$fullName](artemis://courses/$courseId/messages?username=$userName)"
Expand Down

0 comments on commit 9005554

Please sign in to comment.