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

Add a markdown Tag Helper #6

Open
1 of 2 tasks
DamianEdwards opened this issue Jun 30, 2017 · 3 comments
Open
1 of 2 tasks

Add a markdown Tag Helper #6

DamianEdwards opened this issue Jun 30, 2017 · 3 comments

Comments

@DamianEdwards
Copy link
Owner

DamianEdwards commented Jun 30, 2017

Add a Tag Helper that renders markdown. Features:

  • Support element body as markdown content
  • Support pointing at a source markdown file (with caching)
  • Cache the conversion with invalidation when the source changes (easy for body, slightly more difficult for source file but done already in the ScriptInliningTagHelper) This turned out to be a bad idea for element body at least as it might be dynamic. User can wrap in <cache> if they want it cached. Will revisit when adding support for source markdown file.

Example:

<markdown>
    # This is Markdown
    Some source **markdown** to be rendered as *HTML*.
    1. This is great
    1. I know right!?
</markdown>

<markdown src="greeting.md" />
DamianEdwards added a commit that referenced this issue Jul 1, 2017
- #6
- Honor VersionSuffix in build
DamianEdwards added a commit that referenced this issue Jul 1, 2017
- #6
- Add MyGet shield to README.md
@haacked
Copy link
Contributor

haacked commented Jul 9, 2022

I have a markdown tag helper I wrote that doesn't do the src thing, but it does allow sanitized inline HTML (via an allow-html attribute). It also supports a normalize-whitespace attribute to strip leading whitespace based on the first line of non-empty content. It's an adaption of https://github.com/RickStrahl/Westwind.AspNetCore.Markdown but with stronger HTML sanitization (it's been pentested by a security firm).

Let me know if you're interested.

@DamianEdwards
Copy link
Owner Author

Take a look at the one in this library already and if you think it could benefit from improvements in yours then by all means send a PR!

@haacked
Copy link
Contributor

haacked commented Jul 10, 2022

#46 Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants