Compare commits

..

No commits in common. "markdown" and "main" have entirely different histories.

4 changed files with 3 additions and 24 deletions

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>

View file

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>

View file

@ -13,7 +13,6 @@ repositories {
}
dependencies {
implementation("org.jetbrains:markdown:0.4.1")
testImplementation(kotlin("test"))
}

View file

@ -1,25 +1,9 @@
package gay.kemonomimi
import java.io.*
import org.intellij.markdown.parser.MarkdownParser
import org.intellij.markdown.flavours.gfm.GFMFlavourDescriptor
import org.intellij.markdown.html.HtmlGenerator
object Main {
@JvmStatic
fun main(args: Array<String>) {
val src = "~~Some~~ [example webpage](https://www.example.com)"
val flavour = GFMFlavourDescriptor()
val parsedTree = MarkdownParser(flavour).buildMarkdownTreeFromString(src)
val html = HtmlGenerator(src, parsedTree, flavour).generateHtml()
println("Original Text: $src")
println("HTML Output: $html")
write(html)
}
private fun write(input: String) {
val writer = PrintWriter("test.html")
writer.append("<style>.user-del { text-decoration: line-through; }</style>\n")
writer.append(input + "\n")
writer.close()
println("Hello World!")
println("Program arguments: ${args.joinToString()}")
JvavTest().test()
}
}