Skip to content

feat: basic inline code highlighting#145

Merged
danielroe merged 1 commit intodanielroe:mainfrom
OrbisK:feat/inline-code
May 8, 2025
Merged

feat: basic inline code highlighting#145
danielroe merged 1 commit intodanielroe:mainfrom
OrbisK:feat/inline-code

Conversation

@OrbisK
Copy link
Contributor

@OrbisK OrbisK commented May 5, 2025

image

This PR add basic code highlighting for inline code from the issue title. I have created RelatedIssueTitle.vue and RelatedIssueItem.vue

<RelatedIssueTitle class="ml-2 !text-white" :text="issue.title"></RelatedIssueTitle>
<br>
</a>
<a class="ml-4 hover:underline focus:underline" :href="issue.url.split('/issues/')[0]">{{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was

<a class="ml-4 hover:underline focus:underline" :href="`https://github.com/${issue.owner}/${issue.repository}`" >

before. But I thought we might want to be independent of the server

Comment on lines +20 to +26
function escapeHtml(text: string) {
return text.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we dont even need to escape it? 🤔

Copy link
Owner

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful - thank you! ❤️

@danielroe danielroe merged commit 4e93306 into danielroe:main May 8, 2025
5 checks passed
@OrbisK OrbisK mentioned this pull request May 30, 2025
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.

2 participants