Skip to content

Commit

Permalink
smarter pattern for rendering emphasis; tag 0.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jan 10, 2025
1 parent 4a5ffea commit 578b5ba
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 145 deletions.
32 changes: 16 additions & 16 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions compact.cirru
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{} (:package |respo-md)
:configs $ {} (:init-fn |respo-md.main/main!) (:reload-fn |respo-md.main/reload!) (:version |0.4.6)
:configs $ {} (:init-fn |respo-md.main/main!) (:reload-fn |respo-md.main/reload!) (:version |0.4.7)
:modules $ [] |respo.calcit/compact.cirru |respo-ui.calcit/compact.cirru |memof/compact.cirru |lilac/compact.cirru
:entries $ {}
:files $ {}
Expand Down Expand Up @@ -208,16 +208,14 @@
map $ fn (chunk)
tag-match chunk
:code content
code
{} $ :class-name style-inline-code
<> content nil
code $ {} (:class-name style-inline-code) (:inner-text content)
(:url content)
a $ {} (:href content) (:inner-text content) (:target |_blank)
(:link content) (comp-link content)
(:image content) (comp-image content)
(:text content) (<> content nil)
(:emphasis content)
create-element :b $ {} (:inner-text content)
create-element :b ({}) & $ render-inline content
(:italic content)
create-element :i $ {} (:inner-text content)
_ $ <> (str |Unknown: chunk) nil
Expand Down Expand Up @@ -385,7 +383,7 @@
if (nil? xs) nil $ .-1 xs
|peek-emphasis $ %{} :CodeEntry (:doc |)
:code $ quote
def peek-emphasis $ new js/RegExp "\"^([^*/]+)\\*\\*"
def peek-emphasis $ new js/RegExp "\"^(.+)\\*\\*"
|peek-image $ %{} :CodeEntry (:doc |)
:code $ quote
def peek-image $ new js/RegExp "\"^\\!\\[[^\\]]*\\]\\([^\\)]+\\)" "\"g"
Expand Down
2 changes: 1 addition & 1 deletion deps.cirru
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{}
:calcit-version |0.9.6
:calcit-version |0.9.7
:dependencies $ {}
|calcit-lang/lilac |main
|calcit-lang/memof |main
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.4.6",
"version": "0.4.7",
"dependencies": {
"@calcit/procs": "^0.9.6",
"@calcit/procs": "^0.9.7",
"cirru-color": "^0.2.4",
"copy-text-to-clipboard": "^3.2.0"
},
Expand Down
Loading

0 comments on commit 578b5ba

Please sign in to comment.