Skip to content

Conversation

@heiseeyong
Copy link

@heiseeyong heiseeyong commented Dec 5, 2022

缺少a的结束标签

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
缺少a的结束标签
$noteId = count($parentWriter->getNotes()) + 1;
$noteMark = $this->noteType . '-' . $this->element->getRelationId();
$content = "<a name=\"{$noteMark}\"><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a>";
$content = "<a name=\"{$noteMark}\"><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a></a>";
Copy link
Contributor

Choose a reason for hiding this comment

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

The HTML5 standard does not allow nested tags.

It needs to be rewritten like this

$content = "<a name=\"{$noteMark}\"></a><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a>";
Copy link
Member

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

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

A small comment

$noteId = count($parentWriter->getNotes()) + 1;
$noteMark = $this->noteType . '-' . $this->element->getRelationId();
$content = "<a name=\"{$noteMark}\"><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a>";
$content = "<a name=\"{$noteMark}\"><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a></a>";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$content = "<a name=\"{$noteMark}\"><a href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a></a>";
$content = "<a name=\"{$noteMark}\" href=\"#note-{$noteId}\" class=\"NoteRef\"><sup>{$noteId}</sup></a>";

@heiseeyong May be with this fix, it should be better ?

Ping @kernusr

@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants