Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smarter pattern for rendering emphasis #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading