-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
replacement for conf.definitionMap? #2019
Comments
Oh whoops. Should be easy to fix as we do export the the definition map. In theory, it should be: require(["core/dfn-map"], ({definitionMap}) => {
// do stuff.
}); But for some reason it's not working for me. @saschanaz, any ideas from recent changes? |
The
Is that to suppress warnings? |
@gkellogg can correct me, but I believe they import a HTML file with definitions that they use across many spec (and then cull the ones that are not used). |
Might be worth us looking at what the following script does: And seeing if any of that stuff can become part of core. Or, at least figure out a good way to expose things people are using. |
A quick fix is to add |
Agree about not adding that... what are some alternatives? Should we temporarily again expose |
Yes, that will give us some time. #1976 is my suggestion, BTW. |
I like where #1976 is going. We should pick that back up. |
There are different things in https://w3c.github.io/json-ld-syntax/common/common.js besides the support for managing definition lists, the important parts is the following: This is based on code originally created by @halindrome (IIRC) but used in a number of projects where multiple specs share definitions. It's quite dependent on the use of definition lists ( A better solution might be to introduce something like a For example, the definition found at https://github.com/w3c/json-ld-syntax/blob/6f92b1d634760cd7a393b41bce01e151bfd753f0/common/terms.html#L66-L69 might instead be the following: <dt data-dfn-scope="absolute IRI"><dfn>absolute IRI</dfn>
<dd data-dfn-scope="absolute IRI">An <a data-cite="RFC3987#section-1.3" class="externalDFN">absolute IRI</a>
is defined in [[RFC3987]] containing a <em>scheme</em> along with a <em>path</em>
and optional <em>query</em> and fragment segments.</dd> |
Important info
Description of problem
#1954 removed
definitionMap
from the configuration. This is used in my specs to iterate over definitions and remove those that aren't referenced; it's now broken.Is there a replacement mechanism for me to do this using pubsub or something similar?
What happened (e.g., it crashed)?:
Developer console complains
TypeError: undefined is not an object (evaluating 'respecConfig.definitionMap[item]')
But what I was expecting?: A means to iterate over definitions. The code also still depends on jQuery for
makeID
.Optional, steps to reproduce:
The text was updated successfully, but these errors were encountered: