-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved new docs system MusicXML comparisons to highlight relevant s…
…ections. The /comparisons/musicxml/ page now has the fancy 'Show relevant section' vs. 'Show full document' switcher for all relevant examples. This was ported from the old MNX By Example page and was the remaining feature to port. The markup for that old page was done manually, in an error-prone way. This new system automatically handles outputting the markup correctly, based on the data in the document. It's rather fussy due to being a combination of HTML-escaped XML elements, proper HTML markup for formatting/ links and the new HTML markup for locating the diffs. It works by looking for a special element <metadiff> in the MNX and MusicXML examples. If an example has at least one <metadiff>, it will automatically get the diff UI on the /comparisons/musicxml/ page. Any sections of the document wrapped within <metadiff> </metadiff> will get highlighted as the 'relevant sections' of the example. All ExampleDocuments in the system have had the <metadiff> elements added appropriately, using the old MNX By Example page as a guide. One subtle change: In the previous page, we had arbitrary control over where the diffs started and ended, but this new page requires the diffs to start/end cleanly around an XML element. Thus it's no longer possible to highlight just a starting element without its accompanying end element. But that's not a big deal. We can always add an extra hook to highlight start elements (or attributes) if needed. The example_detail pages are unaffected by this change. They do not display 'Relevant sections.' This is an area for potential future improvement.
- Loading branch information
1 parent
028c8b9
commit 8a02d35
Showing
100 changed files
with
928 additions
and
485 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,7 @@ | |
{% block content %}{% endblock %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block finalscript %}{% endblock %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.