Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
  • Loading branch information
distler committed Oct 19, 2018
2 parents 2d59f52 + a5ad9eb commit d6f2f6a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/wiki_controller.rb
Expand Up @@ -567,7 +567,7 @@ def parse_category
@set_name = 'the web'
end
end

def render_atom(hide_description = false, limit = 15)
@pages_by_revision = @web.select.by_revision.first(limit)
@hide_description = hide_description
Expand Down
6 changes: 3 additions & 3 deletions app/models/page_set.rb
Expand Up @@ -29,12 +29,12 @@ def by_name
def by_revision
PageSet.new(@web, sort_by { |page| page.revised_at }).reverse
end

def pages_that_reference(page_name)
all_referring_pages = WikiReference.pages_that_reference(@web, page_name)
self.select { |page| all_referring_pages.include?(page.name) }
end

def pages_that_link_to(page_name)
all_linking_pages = WikiReference.pages_that_link_to(@web, page_name)
self.select { |page| all_linking_pages.include?(page.name) }
Expand All @@ -60,7 +60,7 @@ def characters
# pages in this set for which there is no reference in the web.
# The HomePage and author pages are always assumed to have
# references and so cannot be orphans
# Pages that refer to themselves and have no links from outside are oprphans.
# Pages that refer to themselves and have no links from outside are orphans.
def orphaned_pages
never_orphans = web.authors + ['HomePage']
self.select { |page|
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/tex.rhtml
Expand Up @@ -159,6 +159,8 @@
\Decl@Mn@Close{\rrangle}{mnomx}{'171}
\Decl@Mn@Open{\lmoustache}{mnomx}{'245}
\Decl@Mn@Close{\rmoustache}{mnomx}{'244}
\Decl@Mn@Open{\llbracket}{stmry}{'112}
\Decl@Mn@Close{\rrbracket}{stmry}{'113}
\makeatother

% Widecheck
Expand Down
2 changes: 2 additions & 0 deletions test/functional/wiki_controller_test.rb
Expand Up @@ -1255,6 +1255,8 @@ def set_tex_header
\Decl@Mn@Close{\rrangle}{mnomx}{'171}
\Decl@Mn@Open{\lmoustache}{mnomx}{'245}
\Decl@Mn@Close{\rmoustache}{mnomx}{'244}
\Decl@Mn@Open{\llbracket}{stmry}{'112}
\Decl@Mn@Close{\rrbracket}{stmry}{'113}
\makeatother
% Widecheck
Expand Down
12 changes: 12 additions & 0 deletions test/unit/page_renderer_test.rb
Expand Up @@ -420,6 +420,18 @@ def test_have_latest_itex2mml
%{hscr{ABCD}\\mathcal{ABCD}</annotation></semantics></math></p>},
'Foo $\mathscr{ABCD}\mathcal{ABCD}$')

assert_markup_parsed_as(
%{<p>Foo <math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><semantics>} +
%{<mrow><mrow><mo>⟦</mo><mrow><mtable displaystyle='false' rowspacing='0.5ex'><} +
%{mtr><mtd><mi>a</mi></mtd></mtr> <mtr><mtd><mi>b</mi></mtd></mtr> <mtr><mtd><mi>c</mi>} +
%{</mtd></mtr></mtable></mrow><mo>⟧</mo></mrow><mrow><mo>‖</mo><mrow><mtable displaystyle='false' rowspacing='0.5ex'>} +
%{<mtr><mtd><mi>a</mi></mtd></mtr> <mtr><m} +
%{td><mi>b</mi></mtd></mtr> <mtr><mtd><mi>c</mi></mtd></mtr></mtable></mrow><mo>|} +
%{</mo></mrow></mrow><annotation encoding='application/x-tex'>\\left\\llbracket\\begin{matrix}} +
%{a\\\\ b\\\\ c\\end{matrix}\\right\\rrbracket \\left\\lVert\\begin{matrix}a\\\\ b\\\\ c\\end{matrix}} +
%{\\right\\rvert</annotation></semantics></math></p>},
%{Foo $\\left\\llbracket\\begin{matrix}a\\\\ b\\\\ c\\end{matrix}\\right\\rrbracket \\left\\lVert\\begin{matrix}a\\\\ b\\\\ c\\end{matrix}\\right\\rvert$})

end

def test_blahtex
Expand Down

0 comments on commit d6f2f6a

Please sign in to comment.