Skip to content

Commit

Permalink
Drop default parsing of hashtags and internal links (nextjournal#416)
Browse files Browse the repository at this point in the history
Since we never agreed on what either #tags or [[internal links]] should point to when rendered as html, we decided to stop parsing such expressions by default and rely on context-specific customization instead. We will restore suitable viewers once it's clear how tags and wiki-style links should behave.

Closes nextjournal#383.

See nextjournal/markdown#14 for more context and examples.
  • Loading branch information
zampino committed Feb 14, 2023
1 parent 6ee093d commit ac3aa5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
weavejester/dependency {:mvn/version "0.2.1"}
com.nextjournal/beholder {:mvn/version "1.0.2"}

io.github.nextjournal/markdown {:mvn/version "0.4.138"}
io.github.nextjournal/markdown {:mvn/version "0.5.144"}
babashka/process {:mvn/version "0.4.16"}
io.github.nextjournal/dejavu {:git/sha "4980e0cc18c9b09fb220874ace94ba6b57a749ca"}

Expand Down
2 changes: 0 additions & 2 deletions src/nextjournal/clerk/viewer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,6 @@
{:name :nextjournal.markdown/monospace :transform-fn (into-markup [:code])}
{:name :nextjournal.markdown/strikethrough :transform-fn (into-markup [:s])}
{:name :nextjournal.markdown/link :transform-fn (into-markup #(vector :a (:attrs %)))}
{:name :nextjournal.markdown/internal-link :transform-fn (into-markup #(vector :a {:href (str "#" (:text %))}))}
{:name :nextjournal.markdown/hashtag :transform-fn (into-markup #(vector :a {:href (str "#" (:text %))}))}

;; inlines
{:name :nextjournal.markdown/text :transform-fn (into-markup [:<>])}
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,7 @@
"@lezer/highlight" "^1.1.3"
"@lezer/lr" "^1.3.0"

"@lezer/lr@^1.0.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.2.0.tgz#59aecafdbc15be63f918cf777f470dd17562f051"
integrity sha512-TgEpfm9br2SX8JwtwKT8HsQZKuFkLRg6g+IRxObk9nVKQLKnkP3oMh+QGcTBL9GQsfQ2ADtKPbj2iGSMf3ytiA==
dependencies:
"@lezer/common" "^1.0.0"

"@lezer/lr@^1.3.0":
"@lezer/lr@^1.0.0", "@lezer/lr@^1.3.0":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.3.3.tgz#0ac6c889f1235874f33c45a1b9785d7054f60708"
integrity sha512-JPQe3mwJlzEVqy67iQiiGozhcngbO8QBgpqZM6oL1Wj/dXckrEexpBLeFkq0edtW5IqnPRFxA24BHJni8Js69w==
Expand Down

0 comments on commit ac3aa5f

Please sign in to comment.