[Decomment] 削除線の del tag (strikethrough) 対応#335
Open
shinyonogi wants to merge 2 commits intodevelopfrom
Open
Conversation
jflute
reviewed
Apr 10, 2026
| if (!el) { return; } | ||
| el.addEventListener('mousedown', function(e) { | ||
| e.preventDefault(); | ||
| applyFormatting(textarea, btn.syntax); |
| }, | ||
| /** | ||
| * Render strikethrough (~~text~~) as HTML del tags | ||
| * @param {string} string - text |
Collaborator
There was a problem hiding this comment.
JSDoc, 「削除線対象の選択されたテキスト」みたいなニュアンスの説明があると嬉しい。
| /** | ||
| * Apply formatting syntax around selected text in a textarea. | ||
| * If no text is selected, inserts the syntax markers and places the cursor between them. | ||
| * @param {HTMLTextAreaElement} textarea |
Collaborator
There was a problem hiding this comment.
JSDoc, 一応、何かしら説明を書いておいて欲しい。(もう明確なmのではあるかもだけど)
| // strip dfalias:{} or shalias:{} from display | ||
| var cleanBody = DecommentUtil.removeAliasFromDecomment(decomment.body); | ||
| displayComment += cleanBody; | ||
| displayComment += DecommentUtil.renderStrikethrough(cleanBody); |
Collaborator
| } | ||
| return "" | ||
| var html = element.innerHTML.replace(/<span>@author\([^)]*\)<\/span>/g, '').trim(); | ||
| return html.replace(/<del>([\s\S]+?)<\/del>/g, '~~$1~~'); |
Collaborator
There was a problem hiding this comment.
どっちかにしたい。
o 複数行選択で実行した時1行1行ににょろが付くか
o 単純に複数行をまたいでも評価されるようにするか
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


dbflute/dbflute-intro#55
モーダル