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

Change html visitor and test for annotated paragraph #860

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Microdown-HTMLExporter-Tests/MicHTMLVisitorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ this is another string'.
assert: result trimBoth
equals: '<h1>This is a title</h1>' , newLine
,
'<section id="note"><label for="note">Body of annotated block</label></section>'
'<q id="note">Body of annotated block</q>'
, newLine , '<p>this is another string</p>'
]

Expand All @@ -170,7 +170,7 @@ MicHTMLVisitorTest >> testCreateAnnotationSimple [
self
assert: result trimBoth
equals:
'<section id="note"><label for="note">Body of annotated block</label></section>'
'<q id="note">Body of annotated block</q>'
]

{ #category : 'tests' }
Expand Down
8 changes: 2 additions & 6 deletions src/Microdown-HTMLExporter/MicHTMLVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,9 @@ MicHTMLVisitor >> visitAnnotated: anAnnotatedParagraph [

canvas newLine.
canvas tag
name: 'section';
name: 'q';
parameterAt: 'id' put: anAnnotatedParagraph label;
with: [
canvas tag
name: 'label';
parameterAt: 'for' put: anAnnotatedParagraph label;
with: [ super visitAnnotated: anAnnotatedParagraph ] ].
with: [ super visitAnnotated: anAnnotatedParagraph ].
]

{ #category : 'visiting - inline elements' }
Expand Down
Loading