cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

fix the non-rendering of paragraphs that only contain tables #775

Closed grapesmoker closed 8 years ago

grapesmoker commented 8 years ago

Right now this only works for paragraphs that have a tag preceding the content and the title starts with "table" but hopefully at some point once I figure out how these pieces work together I can come up with a generic solution.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/cmc333333"><img src="https://avatars.githubusercontent.com/u/326918?v=4" />cmc333333</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>Food for thought as an alternative strategy: we're removing all browser-rendered li markers and effectively moving the template-generated markers "out" (i.e. to the left) to match the appearance of browser paragraph markers. This means markerless paragraphs, paragraphs with <em>skipped</em> markers, or crazy paragraph markers like "(b) - (d)" should all work out of the box.</p> <p>We did something very similar at CFPB in the appendices section, but I messed that up pretty badly. @xtine has been fixing the concept up.</p> <p>Should we send this your way when we finish?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/willbarton"><img src="https://avatars.githubusercontent.com/u/10562538?v=4" />willbarton</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>@cmc333333 it sounds like non-browser markers would be ideal for some other marker-related situations we have. If you could send it this way, that'd be grand!</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/grapesmoker"><img src="https://avatars.githubusercontent.com/u/1723233?v=4" />grapesmoker</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>That would be great. I'm not sure if it would solve this particular issue though? The problem is in the rendering code which doesn't render the search and replace layer if there's no text, which means standalone tables don't get rendered.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/cmc333333"><img src="https://avatars.githubusercontent.com/u/326918?v=4" />cmc333333</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>@grapesmoker my bad! I saw the changes to <code>list_type</code> and became overly excited</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/grapesmoker"><img src="https://avatars.githubusercontent.com/u/1723233?v=4" />grapesmoker</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>Oh, yeah, I was doing some monkeying with list_type but I've actually done away with it here because we've simplified the rendering logic some on the template end. Now that we have explicit markers, we just use those.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>