Skip to content

Commit

Permalink
Merge pull request #860 from moufort/846-Annotated-HTML-exporter
Browse files Browse the repository at this point in the history
Change html visitor and test for annotated paragraph
  • Loading branch information
Ducasse authored Aug 19, 2024
2 parents d5e808e + 1b34d1a commit 702fe0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
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

0 comments on commit 702fe0f

Please sign in to comment.