Make sure this works with @-list properties.
Chris Pressey
6 years ago
3 | 3 |
* url: http://example.com/refllama.xml
|
4 | 4 |
* link-target-url: https://github.com/catseye/Feedmark/blob/master/eg/Referenced%20Llama%20Sightings.md
|
5 | 5 |
* hopper: [Stephen](https://en.wikipedia.org/wiki/Stephen_Hopper)
|
6 | |
* llama: has been [spotted][]
|
|
6 |
* spotted @ [the mall][]
|
|
7 |
* spotted @ [the beach](beach.html)
|
7 | 8 |
|
8 | 9 |
Some **llamas** have been [spotted][] recently.
|
9 | 10 |
|
|
11 | 12 |
|
12 | 13 |
* date: Nov 1 2016 09:00:00
|
13 | 14 |
* hopper: [Grace](https://en.wikipedia.org/wiki/Grace_Hopper)
|
14 | |
* llama: it's been [spotted][]
|
|
15 |
* spotted @ [the mall][]
|
|
16 |
* spotted @ [the lumberyard](lumberyard.html)
|
15 | 17 |
|
16 | 18 |
I have strong opinions about this. It's a _shame_ more llamas aren't
|
17 | 19 |
being spotted. Sometimes they are **striped**, it's true, but
|
|
24 | 26 |
Sight them, sigh.
|
25 | 27 |
|
26 | 28 |
[spotted]: spotted.html
|
|
29 |
[the mall]: mall.html
|
27 | 30 |
[site]: https://en.wikipedia.org/wiki/Site
|
25 | 25 |
if obj is None:
|
26 | 26 |
return None
|
27 | 27 |
elif isinstance(obj, dict):
|
28 | |
return dict((k, remove_outer_p(markdown_to_html5_deep(v, **kwargs))) for k, v in obj.items())
|
|
28 |
return dict((k, markdown_to_html5_deep(v, **kwargs)) for k, v in obj.items())
|
29 | 29 |
elif isinstance(obj, list):
|
30 | 30 |
return [markdown_to_html5_deep(subobj, **kwargs) for subobj in obj]
|
31 | 31 |
else:
|
32 | |
return markdown_to_html5(unicode(obj), **kwargs)
|
|
32 |
return remove_outer_p(markdown_to_html5(unicode(obj), **kwargs))
|
33 | 33 |
|
34 | 34 |
|
35 | 35 |
def markdownize_properties(properties, property_priority_order):
|
131 | 131 |
data['documents'][0]['properties']['hopper'],
|
132 | 132 |
'<a href="https://en.wikipedia.org/wiki/Stephen_Hopper">Stephen</a>'
|
133 | 133 |
)
|
134 | |
self.assertEqual(data['documents'][0]['properties']['llama'], 'has been <a href="spotted.html">spotted</a>')
|
|
134 |
self.assertEqual(
|
|
135 |
data['documents'][0]['properties']['spotted'],
|
|
136 |
[u'<a href="mall.html">the mall</a>', u'<a href="beach.html">the beach</a>']
|
|
137 |
)
|
135 | 138 |
self.assertEqual(
|
136 | 139 |
data['documents'][0]['sections'][0]['properties']['hopper'],
|
137 | 140 |
'<a href="https://en.wikipedia.org/wiki/Grace_Hopper">Grace</a>'
|
138 | 141 |
)
|
139 | 142 |
self.assertEqual(
|
140 | |
data['documents'][0]['sections'][0]['properties']['llama'], "it's been <a href=\"spotted.html\">spotted</a>"
|
|
143 |
data['documents'][0]['sections'][0]['properties']['spotted'],
|
|
144 |
[u'<a href="mall.html">the mall</a>', u'<a href="lumberyard.html">the lumberyard</a>']
|
141 | 145 |
)
|
142 | 146 |
|
143 | 147 |
def test_output_refdex(self):
|