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

Annotation HTML output #187

Closed
theorise opened this issue Nov 16, 2015 · 2 comments
Closed

Annotation HTML output #187

theorise opened this issue Nov 16, 2015 · 2 comments

Comments

@theorise
Copy link

I want to be able to include HTML inside my annotions.js comments.

In this case I want to add an itemprop attribute to a h1 tag. I do not want this data inside my pattern file, however I want to notify the PL users that this element should be using this attribute.

I can do this, however PL outputs the HTML tags directly, rather than stringifying them.

I can do it manually, however it is not ideal.

In annotations.js

"comment" : "The header tag should be <h2 itemprop=\"brand\">. 

The manual work around:

"comment" : "The header tag should be &lt;h2 itemprop=\"brand\"&gt;. 

I cannot think of any examples of when a user would want the comment section to be rendered differently using custom markup - so it feels like the default behaviour should stringifying the HTML inside the annotations.js comments:

@bmuenzenmeyer
Copy link
Member

Similar to #145

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Sep 30, 2016

This is now handled best using annotations markdown.
http://patternlab.io/docs/pattern-adding-annotations.html


---
el: ".c-logo-link"
title: "Logo"
---
The logo image is an SVG file, which ensures that the logo displays crisply even on high resolution displays. A PNG fallback is provided for browsers that don't support SVG images.

Further reading: [Optimizing Web Experiences for High Resolution Screens](http://bradfrostweb.com/blog/mobile/hi-res-optimization/)


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

No branches or pull requests

2 participants