Convert org.pkl.core POJOs to record classes (#808)

This commit is contained in:
Kushal Pisavadia
2024-11-13 23:54:41 +00:00
committed by GitHub
parent 406fa4cf40
commit 9a27616956
7 changed files with 89 additions and 337 deletions

View File

@@ -274,8 +274,8 @@ internal abstract class ModuleOrClassPageGenerator<S>(
protected fun HtmlBlockTag.renderMemberSourceLink(member: Member) {
// Prevent churn by setting static line numbers.
// This is so our doc generator tests don't break if, say, we change sources in the stdlib.
val startLine = if (isTestMode) 123 else member.sourceLocation.startLine
val endLine = if (isTestMode) 456 else member.sourceLocation.endLine
val startLine = if (isTestMode) 123 else member.sourceLocation.startLine()
val endLine = if (isTestMode) 456 else member.sourceLocation.endLine()
val moduleSourceUrl =
pageScope.resolveModuleNameToSourceUrl(
member.moduleName,

View File

@@ -114,8 +114,8 @@ internal fun String.replaceSourceCodePlaceholders(
sourceLocation: Member.SourceLocation
): String {
return replace("%{path}", path)
.replace("%{line}", sourceLocation.startLine.toString())
.replace("%{endLine}", sourceLocation.endLine.toString())
.replace("%{line}", sourceLocation.startLine().toString())
.replace("%{endLine}", sourceLocation.endLine().toString())
}
/** Encodes a URI string, encoding characters that are part of URI syntax. */