adlnet / xAPI-Spec

The xAPI Specification describes communication about learner activity and experiences between technologies.
https://adlnet.gov/projects/xapi/
907 stars 404 forks source link

Fix markdown(1033) #1034

Closed garemoko closed 7 years ago

garemoko commented 7 years ago

Fix #1033

Making this PR directly to master branch because due to recent changes in Github's markdown rendering the spec currently looks awful.

Most the the changes were done by a script so I'm relatively confident we caught all the changes. You can view the files here: https://github.com/garemoko/xAPI-Spec/tree/fix-markdown(1033)

The one change not made by code was the fix to the attachments table.

Here's the code used:

<!DOCTYPE html>
<html>
<head>
    <title>spec fix</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script>
        $( document ).ready(function() {
            $.get( "https://raw.githubusercontent.com/adlnet/xAPI-Spec/master/xAPI-About.md", function( data ) {
                // Find all closing anchor tags and replace with ></a>
                // Matching correct anchor tags is required to prevent matching things like <a></a>...<img/>
                data = data.replace(/(<a.*?)(\/>|(\/a>))/g, '$1></a>');
                // Anchors that were correct now have an extra <>. Remove it. 
                data = data.replace(/<><\/a>/g, '</a>');
                // trim spaces as required
                data = data.replace(/ ><\/a>/g, '></a>');
                $( "pre" ).text( data );
            });
        });
    </script>
</head>
<body>
    <pre></pre>
</body>
</html>
garemoko commented 7 years ago

@andyjohnson any chance you could take a look at this and maybe merge it? The spec looks pretty bad at the moment to the extent that people keep opening up duplicate PRs to try and fix it.

andyjohnson commented 7 years ago

Sorry this took so long on my part. Thanks so much for taking care of this adjustment to markdown! +1 and merging as it is aesthetic (although sorely needed!)