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

Make Excision Available for Markdown #8498

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

michaeljmcd
Copy link
Contributor

Markdown as an option in the criteria to use excision and by making the excise operation reuse the type of the tiddler being excised.

In current state, the excision button automatically hides for Markdown tiddlers. If this is manually overridden, then excising from one Markdown tiddler will create a tiddler without a type, which will not render as expected.

Markdown as an option in the criteria to use excision and by making the
excise operation reuse the type of the tiddler being excised.
Copy link

github-actions bot commented Aug 8, 2024

Confirmed: michaeljmcd has already signed the Contributor License Agreement (see contributing.md)

@Leilei332
Copy link
Contributor

There exists a small problem that the excise button makes links in wikitext syntax for markdown tiddlers. IMO they should make links in markdown syntax.

@michaeljmcd
Copy link
Contributor Author

Is your thought to generate links in the format below?

[my link](<#A Relevant Tiddler>)

Another consideration is that the Markdown plugin supports both traditional Markdown link syntax and wiki format (c.f. the pretty link pragma in https://tiddlywiki.com/plugins/tiddlywiki/markdown/#%24%3A%2Fplugins%2Ftiddlywiki%2Fmarkdown). I think wiki links are even enabled by default.

Another option is to check $:/config/markdown/renderWikiTextPragma for prettylink to decide which syntax to use for Markdown.

@michaeljmcd
Copy link
Contributor Author

@Leilei332 - I pushed an updated version to https://github.com/michaeljmcd/TiddlyWiki5/tree/markdown-excise2 that uses wiki links if the markdown pragma is set and falls back on Markdown style links otherwise. I'll merge it into this branch if this is preferred.

@Leilei332
Copy link
Contributor

IMO there is no need to detect enabled wikitext pragma. We can let links created by excision in markdown tiddlers use the markdown syntax regardless of the wikitext pragma.

@saqimtiaz
Copy link
Member

@michaeljmcd could you kindly amend this PR or submit a new one that inserts lins in Markdown syntax?

@michaeljmcd
Copy link
Contributor Author

@saqimtiaz thanks for the reminder, I've made the change to use Markdown syntax for links inserted while excising and resolved merge conflicts.

@Jermolene
Copy link
Member

Great thanks @michaeljmcd

@Jermolene Jermolene merged commit a960e4f into TiddlyWiki:master Sep 10, 2024
3 checks passed
@michaeljmcd michaeljmcd deleted the markdown-excise branch September 10, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants